2013, ഒക്‌ടോബർ 24, വ്യാഴാഴ്‌ച

SORRY_at_PAGE_NO_29

                  There is an error printing mistake in page number 29 we found. The box in this page is corrected as follows. 

Default constructor
Constructor with arguements
Constructor with default arguements
class ABC
{ int a,b;
   public :
      ABC()
       { a=50;b=20; }
       void disp()
        { cout<<a<<b; }
};
void main()
{  ABC M,N;
    M.disp();  // 5 3
    N.disp();  // 5 3
    getch();
}
class ABC
{ int a,b;
   public :
    ABC(int x,int y)
     { a=x;b=y; }
       void disp()
        { cout<<a<<b; }
};
void main()
ABC M(5,3),N(100,150);
  M.disp();  // 5 3
  N.disp(); //100 50
   getch();
}
class ABC
{ int a,b;
 public :
  ABC(int x=30,int y=60)
     { a=x;b=y; }
   void disp()
       { cout<<a<<b; }
};
void main()
{ ABC M(5,3),N(100),Z;
  M.disp();  // 5 3
  N.disp(); //100 60
  Z.disp(); //30 60
   getch();
}



Please Correct Your Triplepluz handbook, Thank You.

1 അഭിപ്രായം: