View Single Post
  #8  
Old 08-10-2011, 10:02 AM
Dergk's Avatar
Dergk Dergk is offline
Little Baby

 
Join Date: Sep 2011
Location: Karachi
Posts: 3
Program / Discipline: BSCS
Class Roll Number: 07-20
Dergk is on a distinguished road
Default Re: Fraction Calculator with 4 functions in c++ [ex12 of ch#5] Robert Lafore

Quote:
Originally Posted by BSIT07-01 View Post
well, just create a new class . something like this...
Code:
class calculator
{
 private:
 
 public:

}
then move all functions to the public part of class ... then in main part create new object from class like this
Code:
calculator mycal;
then where all functions are called in the main part of program . call them using
Code:
mycall.myfunction();
i think this should work...

i we have o add constructors, then how should we do it??
Reply With Quote