#include <iostream> #include <string> #include <vector> using namespace std; int main() { vector<char*> coll; char str[20]; for(int i = 0; i < 3; i++) { cin >> str; coll.push_back(str); } for(int i = 0; i < 3; i++) cout << coll[i]<< endl; return 0; }
std::string
char *
str
vector<chart *>
vector<string>
coll[i]
cout << str << endl;
cout << coll[i] << endl;
for(int i = 0; i < 3; i++) cout << coll[i] << endl;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)