Thread: class prototypes

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    3

    class prototypes

    Why doesn't this compile:

    [edit]sorry got slightly ahead of myself

    Code:
    class b;
    
    class a
    {
    public:
    	int m_a;
    
    	a ()
    	{
    	};
    	a (b *bb)
    	{
    		m_a = bb->m_b;
    	};
    };
    
    class b
    {
    public:
    	int m_b;
    
    	b ()
    	{
    	};
    	b (a *aa)
    	{
    		m_b = aa->m_a;
    	};
    };
    Last edited by drt; 03-29-2006 at 03:37 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Default class template problem
    By Elysia in forum C++ Programming
    Replies: 5
    Last Post: 07-11-2008, 08:44 AM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  3. Creating a database
    By Shamino in forum Game Programming
    Replies: 19
    Last Post: 06-10-2007, 01:09 PM
  4. class errors
    By romeoz in forum C++ Programming
    Replies: 3
    Last Post: 09-16-2003, 07:57 PM