Hi,
I tried to change it everywhere and still gives the same error. However, the code compiles with gcc-3.3.5 (I just tried it) but not with gcc-4.1.2. Any idea what happens? This is very frustrating:(
Thanks,
Fernando...
User Profile
Collapse
-
famat replied to Expected template-name before ‘<’ token.Template class inheritance and virtual methodin CHi,
Where do I have to change template<class U> by template<typena me U>? Everywhere (in all the .cpp implementing the methods for teh template class?)? What is the difference between typename and class?
I tried to change class U by typename U only in the declaration and teh compiler still gives the same error.
Thanks,
Fernando...Leave a comment:
-
famat replied to Expected template-name before ‘<’ token.Template class inheritance and virtual methodin CHi,
Yes, I am using g++. The problem seems to be somehow with the standards. As I said in my first post I compile without any problem using MS-VS. However, GNU gcc wants things different. But after trying many different things I don't know how to put them different. Any suggestion?
Thanks,
Fernando...Leave a comment:
-
famat replied to Expected template-name before ‘<’ token.Template class inheritance and virtual methodin CHi,
Thanks for the quick reply and the tips. I added template<class U> as suggested but I still get the same error from the gcc compiler. Any idea what can be the problem?
Thanks,
Fernando...Leave a comment:
-
famat started a topic Expected template-name before ‘<’ token.Template class inheritance and virtual methodin CExpected template-name before ‘<’ token.Template class inheritance and virtual method
Hi all,
I have C++ source code that compiles on windows-MS VS2005 without any problem. I am trying to compile it in Linux gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4) and I ran into the following compiler error:
error: expected template-name before ‘<’ token
error: expected `{' before ‘<’ token
error: expected unqualified-id before ‘<’ token
(the error points to the line containing...
No activity results to display
Show More
Leave a comment: