problem with std::list using own type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, i'm new to the list.
I'm developing a multiplatform library, using both Microsoft vc2003 (on win xp) and GCC 3.3.4 (on Linux), and the following code that compiles perfectly on vc2003/2005, GCC refuses to doing it:


<-----------------code---------------------->
typedef std::list<AccessItem> AccessList;
typedef std::list<AccessItem>::iterator AccessIt;
<----------------/code---------------------->

where AccessItem is a class defined in the library.Actually, the errors tha gcc displays are:

error : ISO C++ forbids declaration of `list' with no type
error : template-id `list<AccessItem>' used as a declarator

I cannot find out what i'm doing wrong, I thought that typedef's of containers was allowed in GCC, in fact, this code worked on other compilers.... Any idea??

Thanks,

Mariano.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux