Thread: Defining multiple classes in the same header file

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User Stonehambey's Avatar
    Join Date
    Jan 2008
    Location
    Kent, UK
    Posts
    118

    Defining multiple classes in the same header file

    What are the rules of thumb for defining multiple classes in the same header file, with the added requirement that some of those classes are member variables for other classes?

    I was trying to create a linked list the other day, and my compiler kept telling me that it did not recognise some of the member variables within one of the node classes (which was a pointer to another class I had created)

    Regards

    EDIT: I hope this is ok to post here, as it's kinda an extension to the original Q. I didn't want to unnecessarily start a new thread
    Last edited by Stonehambey; 08-14-2008 at 09:43 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Class methods in header or source file?
    By TriKri in forum C++ Programming
    Replies: 13
    Last Post: 09-17-2007, 05:23 AM
  2. multiple file loading. so fruturated! help!
    By psychopath in forum Game Programming
    Replies: 5
    Last Post: 05-09-2005, 05:13 PM
  3. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 10:46 AM
  4. include question
    By Wanted420 in forum C++ Programming
    Replies: 8
    Last Post: 10-17-2003, 03:49 AM