Tuesday, 28 May 2013

Week 12 day 1

You can also put the definition of a function into the declaration of the class, which automatically makes that function inline for example;
class Cat
{
    public:
      int weight(){return itsweight;}
      void setweight(intaweight);
};

No comments:

Post a Comment