#include <iostream>
#include <vector>
using namespace std;
#include <ctime>
#include <cstdlib>
int main()
{
vector<string> names;
string name[] = {"Lady Gaga","Luna Maya","Agnes Monica","Bill Clinton", "Barack Obama"};
for(int i=0; i<5; i++){
names.push_back(name[i]);
}
vector<string>::iterator it;
for(it = names.begin(); it < names.end(); it++){
cout << *it << endl;
}
return 0;
}
#include <vector>
using namespace std;
#include <ctime>
#include <cstdlib>
int main()
{
vector<string> names;
string name[] = {"Lady Gaga","Luna Maya","Agnes Monica","Bill Clinton", "Barack Obama"};
for(int i=0; i<5; i++){
names.push_back(name[i]);
}
vector<string>::iterator it;
for(it = names.begin(); it < names.end(); it++){
cout << *it << endl;
}
return 0;
}
No comments:
Post a Comment