Thread: Sequence of Destructor

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    22

    Question Sequence of Destructor

    I don't understand why the sequence of the Destructor of these two classes are different? Does that make any difference?

    Code:
    class Date
    {
    public:
    	Date( int = 1, int = 1, int = 1990 );
    	~Date();
    	void print();
    
    private:
    	......
    };
    
    class Date
    {
    public:
    	Date( int = 1, int = 1, int = 1990 );
    	void print();
    	~Date();
    
    private:
    	...
    };

  2. #2
    Unregistered
    Guest

    sequence

    It does not make a difference since these are only the declarations. They should however be grouped for better readiblity. Usually the constructor and the desctructor should be right next to each other.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 06-10-2008, 08:38 PM
  2. Immediate programming help! Please!
    By xMEGANx in forum C++ Programming
    Replies: 6
    Last Post: 02-20-2008, 12:52 PM
  3. sequence
    By braddy in forum C Programming
    Replies: 2
    Last Post: 03-30-2006, 02:15 PM
  4. wsprintf and format specifiers
    By incognito in forum Windows Programming
    Replies: 2
    Last Post: 01-03-2004, 10:00 PM
  5. How do I restart a random number sequence.
    By jeffski in forum C Programming
    Replies: 6
    Last Post: 05-29-2003, 02:40 PM