It compiled perfectly until the last part where I must answer Y/N for Another?... I type y for yes but it just went straight to calculating the y and not letting me type a new or word...
not sure if I overlooked something or there's a small error.
If you don't want to include everything and play hide and seek then you're only making it difficult for yourself. Where is outputString()?
I'll give you a kindly tip. If you are so sure it's in a small section, and I don't doubt your word, then just carve that bit out and test that section. Paste a workable (albeit failing) test section here. The turnaround is very fast if you do it this way. Once it works then splice it back in. It is like unit testing.
If you want help on the test unit then feel free. Time's moving on :)
It's your lucky day! I forgot to show the output after the fix ... which is close to what you want/need
Enter a name: Hide and seek
Another? (y/n)y
We're done - hide and seek is over
Enter a name: Seek and Hide
Another? (y/n)N
We're done - hide and seek is over
Exit code: 0 (normal program termination)
Hint: shift exit message down a line or two to reflect what happens at end.
Enter a name: Hide Seek
Another? (y/n)Y
Enter a name: Seek Hide
Another? (y/n)N
We're done - hide and seek is over
Exit code: 0 (normal program termination)
Good. Sorry to give you a hard time but it's mainly to enable you to do some testing yourself instead of having to grapple with many many lines.
Always remember, it's a well known killer, if you mix cin with getline you have to 'clear the stream' with ignore and reset the stream fail with clear. You can read up on it when you have time, but if you input a string with a blank space in it the stream reads there are two strings because of the space. So you need to clear the junk and then use getline.
1000 is to make sure you miss nothing, gentle is right with the more complicated limit stuff - it blitzes with absolute certainty, 1000 doesn't, some ppl use 256 but not good.
Perhaps even write it down, thousands have lost sleep, left home, given up, spoken badly to domestic animals, and even worse for not knowing/remembering.
It's fine you give me a hard time... I need the push to find alternatives and push myself harder. I like the challenge and to learn as much as possible in a day or in a week. So thanks pal!! I appreciate it, I did feel like I didn't learn as much as I thought I should from my Intermediate class. Like some codes, I had some help along the way. The Basic C++ was easy for me, but the Intermediate C++ just started, and I feel like there's a gap where I should know some things before doing the assignment....
So again thanks for the hard time or the push( positive ).