RSS Forums RSS
Please support our C advertiser: Programming Forums

Need help with Const, Ref and Classes.

Join Date: Mar 2004
Posts: 76
Reputation: infamous is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 2
infamous infamous is offline Offline
Junior Poster in Training

Re: Need help with Const, Ref and Classes.

  #2  
Mar 23rd, 2004
1)what u should do is have a member function called add_fract(Fraction ftoadd). this function would be used as follows:
 Fraction fract(3,4), other_fract(5,6);
 
 fract.add_fract(other_fract);
 
then this would add other_fract to fract. you also need to add a 'get' method to your class, something that will return the two private members num and denom.

2)get/set methods!

3)i dont understand what you mean?
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 10:58 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC