Thread: Problem with classes

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    7
    I don't think the problem is there, I always use that header guard.

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    7
    I found the problem, I had too many include

    Code:
    #if !defined(VISITE_H_INCLUS)
    #define VISITE_H_INCLUS
    #include <iostream>
    #include <string>
    
    using namespace std;
    
    class ClVendeur;
    class ClEntreprise;
    
    class ClVisite
        {
        public :
        ClVisite(int p_date, int p_noContrat, bool p_estExistante)  
    		: m_date(p_date), m_noContrat(p_noContrat), m_estExistante(p_estExistante)
            {}
    
    	int Date() const { return m_date; }
    	int NoContrat() const { return m_noContrat; }
    	bool EstExistante() const { return m_noContrat; }
    
    
        private :
    	int m_date;
    	ClVendeur* m_pVendeur;
    	ClEntreprise* m_pEntreprise;
    	int m_noContrat;
    	bool m_estExistante;
        };
    #endif

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. problem with classes and pointers
    By Akkernight in forum C++ Programming
    Replies: 18
    Last Post: 02-21-2009, 06:21 AM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Having a problem with Classes
    By FoxTrot in forum C++ Programming
    Replies: 10
    Last Post: 09-06-2007, 07:40 PM
  4. Problem with destructors.
    By Hulag in forum C++ Programming
    Replies: 7
    Last Post: 06-11-2004, 12:30 PM
  5. problem w/ nested templatized classes
    By *ClownPimp* in forum C++ Programming
    Replies: 8
    Last Post: 10-19-2002, 07:58 AM