Firstly, thank you to everyone who helped me in the other thread; I'm really starting to grasp the concepts of calling functions and variables between functions. :)
My problem this time is that I can't get this 'termination' function to work properly. I want to ask the user if they want to continue the program, and if y/Y, then repeat. If they input anything except for y/Y, then terminate the program.
What I have so far is not terminating the function. I assume my while loop isn't worded properly. Can someone help me tweak it a little?
On a side note, I'm also getting the error:
(51): warning C4018: '<' : signed/unsigned mismatch
though the program will works even with this error.
I've only been coding in C++ for about 3 weeks now, so I have no idea what this error means. If someone more experienced could check that out, I'd be grateful!
My program works just fine -as it should-, but only if I don't use a separate function to call for termination. I really need to know why my termination function isn't working.
Anyway, here's my 100% working code without the separate functions from above (for comparison):
int main(){
char run = 'y';
while (run == 'y' || run == 'Y'){
// ....
// char run = reRun(); // *** this defines a new variable
run = reRun() ;
}
return 0;
}