Answers for "programs using vectors in c++"

C++
0

programs using vectors in c++

#include<iostream>  
#include<vector>  
using namespace std;  
int main()  
{  
vector<string> v1;  
v1.push_back("vectors");  
v1.push_back("are useful");  
for(vector<string>::iterator itr=v1.begin();itr!=v1.end();++itr)  
cout<<*itr;  
return 0;   
}
Posted by: Guest on July-09-2021

Browse Popular Code Answers by Language