Click here to Skip to main content
15,887,135 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionquery Pin
anassamar12-Mar-09 11:38
anassamar12-Mar-09 11:38 
AnswerRe: query Pin
Stuart Dootson12-Mar-09 11:59
professionalStuart Dootson12-Mar-09 11:59 
AnswerRe: query Pin
David Crow12-Mar-09 16:37
David Crow12-Mar-09 16:37 
AnswerRe: query Pin
A_xin12-Mar-09 23:51
A_xin12-Mar-09 23:51 
QuestionContains [modified] Pin
su_penguin12-Mar-09 11:16
su_penguin12-Mar-09 11:16 
AnswerRe: Contains Pin
Stuart Dootson12-Mar-09 11:56
professionalStuart Dootson12-Mar-09 11:56 
GeneralRe: Contains Pin
Rajasekharan Vengalil12-Mar-09 17:46
Rajasekharan Vengalil12-Mar-09 17:46 
QuestionA class within a class Pin
Chris Copeland12-Mar-09 10:42
mveChris Copeland12-Mar-09 10:42 
Hey.

I'm trying to store a general, overall class that will store other classes within for a much easier accessible object, however, I keep running into the same problem.

Here's a small example of the code i'm trying to produce:

class A {
public:
	A();
	~A();
};

class B {
public:
	B();
	~B();
	A Foo;
};


And it keeps throwing the same error at me, that there's an unrecognised identifier before the variable 'Foo', and that default-int isn't supported (obviously).

Class A is in a seperate header file, but i'm including it at the top of the header file for Class B. However, no matter what I try, it refuses to believe that 'class A' exists, and can't reference to it. I've even tried using the typedef keyword to declare 'class A' as an identifier, but even that won't work.

I can't find any results over Google, nor here, about this problem. Can anyone assist?

Thanks in advance.
AnswerRe: A class within a class Pin
CPallini12-Mar-09 11:09
mveCPallini12-Mar-09 11:09 
AnswerRe: A class within a class Pin
Stuart Dootson12-Mar-09 11:10
professionalStuart Dootson12-Mar-09 11:10 
GeneralRe: A class within a class Pin
Chris Copeland12-Mar-09 11:19
mveChris Copeland12-Mar-09 11:19 
GeneralRe: A class within a class Pin
Stuart Dootson12-Mar-09 11:31
professionalStuart Dootson12-Mar-09 11:31 
GeneralRe: A class within a class Pin
Chris Copeland12-Mar-09 11:32
mveChris Copeland12-Mar-09 11:32 
GeneralRe: A class within a class Pin
Stuart Dootson12-Mar-09 11:58
professionalStuart Dootson12-Mar-09 11:58 
GeneralRe: A class within a class Pin
Chris Copeland12-Mar-09 12:01
mveChris Copeland12-Mar-09 12:01 
GeneralRe: A class within a class Pin
Stuart Dootson12-Mar-09 12:08
professionalStuart Dootson12-Mar-09 12:08 
GeneralRe: A class within a class Pin
Chris Copeland12-Mar-09 12:18
mveChris Copeland12-Mar-09 12:18 
QuestionMemory Checker Tools Pin
BobInNJ12-Mar-09 9:49
BobInNJ12-Mar-09 9:49 
QuestionRe: Memory Checker Tools Pin
David Crow12-Mar-09 10:06
David Crow12-Mar-09 10:06 
AnswerRe: Memory Checker Tools Pin
BobInNJ12-Mar-09 10:09
BobInNJ12-Mar-09 10:09 
GeneralRe: Memory Checker Tools Pin
David Crow12-Mar-09 10:12
David Crow12-Mar-09 10:12 
GeneralRe: Memory Checker Tools Pin
BobInNJ12-Mar-09 10:15
BobInNJ12-Mar-09 10:15 
AnswerRe: Memory Checker Tools Pin
Yusuf12-Mar-09 12:46
Yusuf12-Mar-09 12:46 
QuestionHow to trigger a hotkey event using MFC? Pin
DavidA200512-Mar-09 7:12
DavidA200512-Mar-09 7:12 
QuestionMFC beginner Pin
p_196012-Mar-09 5:55
p_196012-Mar-09 5:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.