PDA

View Full Version : 'CLASS' does not name a type



plopes21
13th June 2012, 14:53
I have this example below. How to solve this problem?



class ABC{
private:
XYZ *xyz; //XYZ is not defined yet
};

class XYZ{
private:
ABC *abc; //ABC is defined above
};

wysota
13th June 2012, 15:42
Put "class XYZ;" before line #1. And then go and learn about "forward declarations" in C++.

plopes21
13th June 2012, 16:04
thanks for help =)

mahesh123
16th August 2013, 11:56
Hello ,

I am using one dialog box for conformation (named d). In that i am trying to create one object for another class(named measure) to access that class variables like
Measure *m; I got an error as

'Measure' does not name a type.


please suggest me where i am doing wrong.

cupidsrose
27th August 2013, 03:42
Hi, everybody, I am a new friend.