Advertisement
Guest User

Untitled

a guest
Dec 10th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. Time Time::operator++(int)//i think this is the prefix operator??
  2. {
  3.   Time tmp = *this;
  4.  
  5.   ++(*this);
  6.  
  7.   return tmp;
  8. }
  9.  
  10. Time& Time::operator++() //i think this is the postfix operator
  11. {
  12.   int tmp = this->convertToSecs() + 1;
  13.  
  14.   this->setTime(tmp);
  15.  
  16.   return *this;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement