#include <iostream>
#include <vector> //include the vector library
using namespace std;
int main()
{
vector<int>myVector;
myVector.push_back(2);
myVector.push_back(7);
myVector.push_back(7); //vector<int>mybector;
for(int i=0; i<myVector.size(); i++) // to use the size member function. use myVector.size()
{
cout << myVector[i];
}
}
This post has been edited by baavgai: 16 February 2013 - 03:56 AM
Reason for edit:: tagged

New Topic/Question
Reply



MultiQuote





|