[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
vector not linked?
From: |
Samik Raychaudhuri |
Subject: |
vector not linked? |
Date: |
Mon, 14 Jun 2004 13:43:23 -0400 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040514 |
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.
- vector not linked?,
Samik Raychaudhuri <=