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]

Re: gcc 3.2 bug with STL


Sourav Ghosh wrote:

> 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.

> #include <vector>
> main()
> {
>   vector <int> RV;
> }

Your code is buggy. vector is in the namespace std.
Hence, you have to write
  sdd::vector <int> RV;
instead. Alternatively, you can write
  using namespace std;
before main. You should get yourself a recent book on C++.

Greetings,
Volker Reichelt



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