When i last time tried to add vectors i got nasty error (in dev-c++) that opens another file .cpp and cite the error, a line that has some iterator.
this is the code
Code:#include <iostream> #include <vector> using namespace std; int main() { //Making vectors vector<string> my; my.push_back("Car"); my.push_back("Boat"); my.push_back("Plane"); vector<string> yours; yours.push_back("Jet"); yours.push_back("Parachute"); yours.push_back("Wings"); vector<string> ours(my, yours); return 0; }
plz tell me how to add more than one vector (for example 5 vectors) in one vector ? do i have to specify the size of the vector that is having all the vectors ??