diff options
Diffstat (limited to '9p11.cpp')
-rw-r--r-- | 9p11.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/9p11.cpp b/9p11.cpp new file mode 100644 index 0000000..9165a26 --- /dev/null +++ b/9p11.cpp @@ -0,0 +1,22 @@ +#include <iostream> +#include <vector> + +/* + * + * 9.11 + * + * + */ + +int main () { + + std::vector<int> v1; // empty + std::vector<int> v2(v1); // empty + std::vector<int> v3 = v1; // empty + std::vector<int> v4(1); // 1 element, default initialized + std::vector<int> v5(10,1); // 10 elements, initialized to 1 + std::vector<int> v6{10,10,1}; // 3 elements, values 10, 10, 1 + std::vector<int> v7 = {10, 10, 1}; // 3 elements, values 10, 10, 1 + std::vector<int> v8(v5.begin(), v5.end()); // Same as v5 + return 0; +} |