mutual composition in c++

Discussion in 'C Programming' started by hooshdar3, Jun 29, 2010.

  1. hooshdar3

    hooshdar3

    Joined:
    May 7, 2010
    Messages:
    5
    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++?
     
    hooshdar3, Jun 29, 2010
    #1
    1. Advertising

  2. hooshdar3

    hooshdar3

    Joined:
    May 7, 2010
    Messages:
    5
    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.
     
    hooshdar3, Jun 29, 2010
    #2
    1. Advertising

  3. hooshdar3

    hooshdar3

    Joined:
    May 7, 2010
    Messages:
    5
    seems that a list is just a pointer to the first element and so it doesn't err.
     
    Last edited: Jun 29, 2010
    hooshdar3, Jun 29, 2010
    #3
  4. hooshdar3

    hooshdar3

    Joined:
    May 7, 2010
    Messages:
    5
    Any help is welcome....please!
     
    hooshdar3, Jun 29, 2010
    #4
  5. hooshdar3

    hooshdar3

    Joined:
    May 7, 2010
    Messages:
    5
    anyone to help me??
     
    hooshdar3, Jun 30, 2010
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vjeran Marcinko

    Mutual EJB possible?

    Vjeran Marcinko, Oct 17, 2003, in forum: Java
    Replies:
    3
    Views:
    465
    Michael Borgwardt
    Oct 17, 2003
  2. Giambattista Bloisi

    non-blocking mutual exclusion

    Giambattista Bloisi, Dec 16, 2003, in forum: Java
    Replies:
    1
    Views:
    436
    Matt Humphrey
    Dec 16, 2003
  3. Bob Hairgrove

    Re: Mutual subclass dependency

    Bob Hairgrove, Oct 19, 2004, in forum: C++
    Replies:
    1
    Views:
    400
    Martin Magnusson
    Oct 19, 2004
  4. .
    Replies:
    0
    Views:
    630
  5. icoba@yahoo.com

    Import Error ('mutual inclusion of modules'?)

    icoba@yahoo.com, Aug 23, 2005, in forum: Python
    Replies:
    2
    Views:
    268
    icoba@yahoo.com
    Aug 23, 2005
Loading...

Share This Page