Advertisement
Sanlover

Untitled

Dec 22nd, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1.  
  2. string Money::toString() const {
  3. string result = std::to_string(balance.to_double());
  4.  
  5. if (result.substr(result.find('.') + 1).size() > 2)
  6. result.erase(result.find('.') + 3);
  7. return result;
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement