mutual composition in c++

Joined
May 7, 2010
Messages
5
Reaction score
0
Hello.

I want to make my "Evaluation" class host an object of class "Arbiter" and my "Arbiter" class hold a list of "Evaluation" objects.Is it possible in C++?
 
Joined
May 7, 2010
Messages
5
Reaction score
0
ok, I tried it.It seems to be working with forward class declaration;but what if I want class"Arbiter" to hold an object of class "Evaluation" instead of a list?
It doesn't work with just a forward class declaration.
 
Joined
May 7, 2010
Messages
5
Reaction score
0
seems that a list is just a pointer to the first element and so it doesn't err.
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top