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: template under gcc version 3.3.2


Morten,

  First one note, I don't see you including anything for the std::deque type.

  You should at least add: #include <deque>

corey

> g++ -ansi -pedantic -Wall -o stest5_test_00.out stest5_test_00.cpp -L
> /opt/sfw/gcc-3/lib/ -R /opt/sfw/gcc-3/lib/ -lstdc++
> stest5_test_00.cpp:11: error: syntax error before `;' token
> 
> #include <iostream>
> #include <string>
> #include <cstdlib>
> 
> // #include "stack5.hpp"
> 
> template <typename T>
> class Stack {
>   private:
>     std::deque<T> elems;   // elements


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