Template help

Liu WS louispp@hotmail.com
Sat Nov 11 01:08:00 GMT 2000


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 .



More information about the Gcc mailing list