Skip to content

Instantly share code, notes, and snippets.

@vainveins
Last active November 12, 2015 19:27
Show Gist options
  • Save vainveins/f2578943b380b97be2d0 to your computer and use it in GitHub Desktop.
Save vainveins/f2578943b380b97be2d0 to your computer and use it in GitHub Desktop.
timeFun prototype
//get time 24 hours
void getTime24(int&hour, int&min);
//optional
pass by value:
conver24to12:
input hour24
input min24
pass by reference:
output
hour12
min12
cout << printTime12;
AMPMcode ? Character ('a' or 'p')
dont track minutes, dont pass minutes only hours (min stays the same)
bool userwantstocontinue();
prompt user y or n
get input
prompt until y or n (loop)
return true or false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment