Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void call_input(char time_of_call[])
- {
- char yes_or_no[4] = "no";
- cin >> time_of_call;
- time_of_call[sizeof(time_of_call) - 1] = '\0';
- while(yes_or_no[0] != 'y' && yes_or_no[1] != 'e' && yes_or_no[2] !='s') {
- cout << "\nYour time was " << time_of_call
- << "\nIs this correct > ";
- cin >> yes_or_no;
- yes_or_no[sizeof(yes_or_no) -1] = '\0';
- if(yes_or_no[0] != 'y' && yes_or_no[1] !='e' && yes_or_no[2] !='s') {
- cout << "Enter the time again > ";
- cin >> time_of_call;
- time_of_call[sizeof(time_of_call) - 1] = '\0';
- }
- }
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement