This is the mail archive of the gcc@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]

Template help


why i can not compile c++ code like this:
//code start
template <class T1> struct test01 {
  typedef T1::Type1 Type1;
};
//code end;

gcc tell me:
test1.cpp:2: `T1::Type1' is not a valid declarator
test1.cpp:2:   perhaps you want `typename T1::Type1' to make it a type
test1.cpp:2: parse error before ';' token

Best Regards


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


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