Simple Short Class Question

This is a discussion on Simple Short Class Question within the C++ Programming forums, part of the General Programming Boards category; Oke, i have a class and in that class is a funtion and another class and in that class is ...

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    1,640

    Simple Short Class Question

    Oke, i have a class and in that class is a funtion and another class and in that class is a function, now i want to call that function from that function in its parent class
    Explenation:

    Class
    +
    |
    - Function <- this function has to call
    |
    + class
    | +
    | |
    | - function <- this function

    Now i create a constructor in the calling function like so
    Class::class Class_class;

    But this doesn't seem to work

  2. #2
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078
    You might want to rephrase your question.

    You're saying you have a class nested within a class, but I think you mean you have a class instance nested -- there's a difference (also a "parent class" generally means something very different as well).

    If you mean the latter, then you just call it in the same manner that you would as if you were in the scope of the object in a function, etc. There's no difference.

    Post the code so we can better see the problem.

  3. #3
    Registered User
    Join Date
    Sep 2002
    Posts
    1,640
    OOOH! i dont believe this! i figured it out, simple fault on my
    side, had a function called the same as the class higher in the
    declarations and disabled my class

    Thx for repyling anyway.
    Close me

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple C# structure question
    By sketch in forum C# Programming
    Replies: 4
    Last Post: 09-14-2007, 05:29 PM
  2. class and pointer question
    By l2u in forum C++ Programming
    Replies: 3
    Last Post: 10-03-2006, 11:00 AM
  3. Say what? - Weird error.
    By Blackroot in forum C++ Programming
    Replies: 6
    Last Post: 08-16-2006, 12:54 AM
  4. Simple class question
    By 99atlantic in forum C++ Programming
    Replies: 6
    Last Post: 04-21-2005, 12:41 AM
  5. Simple Question, I think
    By Unregistered in forum C++ Programming
    Replies: 4
    Last Post: 04-01-2002, 10:36 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21