Thread: errors.. errrors.. more errors

  1. #16
    Registered User The Dog's Avatar
    Join Date
    May 2002
    Location
    Cape Town
    Posts
    788
    Eg.
    Code:
     
    class DOG 
    {
    public:
            int GetAge();
            virtual ~Dog();
    private:
            int Age;
    };
    Nothing can access 'Age' except the member function GetAge().
    Even derived classes won't have access to 'Age'.
    To give acces to derived classes, 'private' should be changed to 'protected'

  2. #17
    Seeking motivation... endo's Avatar
    Join Date
    May 2002
    Posts
    537
    Originally posted by Klinerr1
    i need the varibles in that class thing to be noticed before int main(); will it work the same way
    wut does if it is grpahical mean?
    If you are planning on making your program with graphics, then you will need a draw( ) function to draw the object to the screen. I wouldn't worry about it, it doesn't seem like your planning on doing this.

  3. #18
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    so dont use that line?
    Email: [email protected] || AIM: MisterSako || MSN: [email protected]

    -the shroom has spoken

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. global namespace errors
    By stubaan in forum C++ Programming
    Replies: 9
    Last Post: 04-02-2008, 03:11 PM
  2. Ten Errors
    By AverageSoftware in forum Contests Board
    Replies: 0
    Last Post: 07-20-2007, 10:50 AM
  3. Stupid compiler errors
    By ChrisEacrett in forum C++ Programming
    Replies: 9
    Last Post: 11-30-2003, 05:44 PM
  4. Help me with these errors... :-(
    By major_small in forum C++ Programming
    Replies: 6
    Last Post: 09-07-2003, 08:18 PM
  5. errors in class(urgent)
    By ayesha in forum C++ Programming
    Replies: 2
    Last Post: 11-10-2001, 06:51 PM