Hello,
I am using cygwin version of gcc/g++ 3.3.1 [current build] and trying
to compile the following simple program:
-------------------------------
#include <iostream>
#include <vector>
using namespace std;
int main()
{ vector v;
v.push_back(12);
v.push_back(20);
for(int i=0;i<v.size();i++)
{ cout<<v[i]<<endl; }
}
------------------------------------------
This is the error msg I am getting:
v.cpp: In function `int main()':
v.cpp:6: error: `vector' undeclared (first use this function)
v.cpp:6: error: (Each undeclared identifier is reported only once for
each
function it appears in.)
v.cpp:6: error: syntax error before `;' token
v.cpp:7: error: `v' undeclared (first use this function)
Am I missing something or is g++ broken?
Thanks for any pointers.
Regards.
-Samik
----------------
Change 'K' to 'e' to mail me directly.