This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc 3.2 bug with STL


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]