Thread: help in object

  1. #1
    Registered User
    Join Date
    Feb 2010

    help in object

    i have this program and i cant compile it

    class dog
          int age, weight;
          char color;
                void setvalues(int, int, char);
    void dog::setvalues(int age, int weight, char color)
         this -> age = age; // using this-> will explicily refer to the class memnert
          weight -> = weight;
          color -> = color;
          dog fido; 

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Some Interview questions, please help
    By higaea in forum C++ Programming
    Replies: 5
    Last Post: 03-29-2010, 06:35 AM
  2. Inheriting Linked List
    By robolee in forum C++ Programming
    Replies: 20
    Last Post: 10-17-2009, 07:50 PM
  3. Replies: 4
    Last Post: 11-14-2006, 11:52 AM
  4. const at the end of a sub routine?
    By Kleid-0 in forum C++ Programming
    Replies: 14
    Last Post: 10-23-2005, 06:44 PM
  5. Set Classes
    By Nicknameguy in forum C++ Programming
    Replies: 13
    Last Post: 10-31-2002, 02:56 PM