gcc 3.2 bug with STL
Sourav Ghosh
sourav@cs.cmu.edu
Sun Oct 27 08:26:00 GMT 2002
Hello,
I have not been able to compile a simple program using standard template
library in C++ using gcc 3.2 that came with Mandrake Linux 9.0.
The program "test.cc" is written below
-------------------
#include <iostream>
#include <stdio.h>
#include <string>
#include <set>
#include <vector>
main()
{
vector <int> RV;
}
---------------------------------
This program only declares a variable RV as a vector integers.
The error that I get is the following:
-----------------------------------
$ make test
g++ test.cc -o test
test.cc: In function `int main()':
test.cc:11: `vector' undeclared (first use this function)
test.cc:11: (Each undeclared identifier is reported only once for each
function it appears in.)
test.cc:11: parse error before `>' token
make: *** [test] Error 1
----------------------------
Please let me know if I am missing something.
Thanks,
--Sourav
More information about the Gcc-bugs
mailing list