Sorting an array using selection sort 18.2 Introduction to iterators 18.3 Introduction to standard library algorithms 18.4 Timing your code Chapter 19 Dynamic Allocation (under construction) 19.1 Dynamic memory allocation with new and delete 19.2
-"11-9-Pointer-arithmetic-and-array-indexing.md" -"11-10-C-style-string-symbolic-constants.md" -"11-11-Dynamic-memory-allocation-with-new-and-delete.md" -"11-12-Dynamically-allocating-arrays.md" -"11-13-For-each-loops.md" -"11-14-Void-pointers.md" ...
intwidth(5);//direct initializationintwidth =5;//copy initialization {}与=区别,{}用来初始化,初始化只有1次。=用来赋值,赋值可以有很多次。{}初始化更安全,因为有类型检查。 2、避免使用using namespace 【推荐】使用 :: #include <iostream>//using namespace std;//全局权限太大intmain() { std::c...
{}与=区别,{}用来初始化,初始化只有1次。=用来赋值,赋值可以有很多次。{}初始化更安全,因为有类型检查。 2、避免使用using namespace 【推荐】使用 :: #include <iostream> //using namespace std; //全局权限太大 int main() { std::cout << "Hello World!\n"; //推荐 :: return 0; } 1. 2...
Arrays, Strings, and Dynamic Allocation 11.1 Arrays (Part I) 11.2 Arrays (Part II) 11.3 Arrays and loops 11.4 Sorting an array using selection sort 11.5 Multidimensional Arrays 11.6 C-style strings 11.7 std::string_view (part 2) 11.8