blob: d03a86b1325b15b1613f0bf27c86585516e493d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include <iostream>
#include <vector>
/*
*
* 3.12
*
*
*/
using std::string;
using std::cout;
using std::cin;
using std::cerr;
using std::clog;
using std::endl;
using std::vector;
int main () {
vector<vector<int>> ivec; // A vector of vectors of int
//vector<string> svec = ivec; // Not valid, you can not initialize a vector of strings to with a vector of int.
vector<string> svec(10, "null"); // A vector of 10 objects of type string all initialized to "null"
return 0;
}
|