Re: Strange bug: struct is not a type in C++?
Re: Strange bug: struct is not a type in C++?
- Subject: Re: Strange bug: struct is not a type in C++?
- From: Nicholaz Beresford <email@hidden>
- Date: Wed, 08 Oct 2008 20:32:51 +0200
Well, it did compile ok on a MSVC8 before I sent my answer to the list
(did not have an GCC available at that time) and the MS compile error in
the original code was not so different from yours.
Nick
Jean-Denis Muys wrote:
On 8 oct. 08, at 10:38, Nicholaz Beresford wrote:
class1::insideStruct *p1;
class1::insideStruct *p2;
Unsurprisingly, this doesn't work as you cannot use a template class
without specifying the actual type parameter.
Indeed, the compiler complains on this with :
/.../main.cpp:24: error: 'template<class Type> class class1' used
without template parameters
/.../main.cpp:24: error: ISO C++ forbids declaration of 'insideStruct'
with no type
/.../main.cpp:24: error: expected ';' before '*' token
(also, in my original code, the comments were reversed: the line without
"struct" is rejected, while the line with "struct" compiles fine).
Jean-Denis
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden