• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Strange bug: struct is not a type in C++?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange bug: struct is not a type in C++?


  • Subject: Re: Strange bug: struct is not a type in C++?
  • From: Jean-Denis Muys <email@hidden>
  • Date: Wed, 08 Oct 2008 13:14:13 +0200


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


  • Follow-Ups:
    • Re: Strange bug: struct is not a type in C++?
      • From: Nicholaz Beresford <email@hidden>
    • Re: Strange bug: struct is not a type in C++?
      • From: Emil Pettersson <email@hidden>
References: 
 >Strange bug: struct is not a type in C++? (From: Jean-Denis Muys <email@hidden>)
 >Re: Strange bug: struct is not a type in C++? (From: Nicholaz Beresford <email@hidden>)

  • Prev by Date: Re: Strange bug: struct is not a type in C++?
  • Next by Date: Re: Strange bug: struct is not a type in C++?
  • Previous by thread: Re: Strange bug: struct is not a type in C++?
  • Next by thread: Re: Strange bug: struct is not a type in C++?
  • Index(es):
    • Date
    • Thread