This is the mail archive of the gcc-help@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: [Fwd: Issue with STL, queues and Stacks]


Frank wrote:

> I have a program working jut fine under Solaris compiled with Sun
> Workshop compiler, but will not compile with g++. Line it's
> complaining about is :
> 
> queue<myclass> *ptr;
> 
> or
> 
> std::stack<myclass> *ptr;
> 
> I have using namespace std: in the .h and it still compains with or
> with out the std:: I have gcc 2.95.3
>
> No thoughts on this?

Works fine here:

    fox:~$ cat qs.cpp
    #include <queue>
    #include <stack>

    class myclass { myclass() {}; };

    std::stack<myclass> *ptr1;
    std::queue<myclass> *ptr2;

    fox:~$ local/gcc295/bin/g++ -c -Wall qs.cpp
    fox:~$ local/gcc32/bin/g++ -c -Wall qs.cpp
    fox:~$ CC -c qs.cpp
    fox:~$ CC -V
    CC: Sun WorkShop 6 update 2 C++ 5.3 Patch 111685-04 2001/12/13
    fox:~$

What's the exact error message?

Rup.


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