Jump to content


Photo

adding 2 int togeter to form a whoel anumber


  • Please log in to reply
1 reply to this topic

#1 swaphaj

swaphaj

    Newbie

  • Members
  • Pip
  • 19 posts

Posted 12 May 2009 - 12:10 PM

i got 1 problem..
can someone help me wit the logic?



Money Money ::operator+(const Money &rhs)const
{

Money temp;

temp.a = a+rhs.a;
temp.b = b+rhs.b;

return temp;

}//end



i got 2 number e.g 6.2 and 3.8
6 is int a
2 is int b

3 is int a
8 is int b

how can i add them up so that they become 10?

anyone can help?


_________________________________________________________________________
where the red fern grows
online stock trading

#2 PuTer

PuTer

    Full Member

  • Members
  • PipPipPip
  • 193 posts

Posted 17 May 2009 - 10:39 PM

Hello...

am not programmer so cannot answer. hopefully someone will.
-puTer

I have recorded your IP, computer detail and ISP just in case... if i need them
user posted image




2 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


    Google (2)