In terms of the code maybe you could create a function that asks a question and then gets a valid answer. I don't know if that kind of thing is something that you could do yet but it would cut down on some of the clutter there a little. This one's not too bad, but long functions make me scared, lol.
Also, something that may make your life a little easier:
cout << "Have you seen" << " " << friend_name<< " " << "lately?\n";
could just as easily be:
cout << "Have you seen " << friend_name<< " lately?\n";
Unless you're after explicit spacing there, which is fine.
Finally, please enclose code on the forum in source braces. When you're making a post and you want to insert code just click the little red brackety button at the end of the second line of buttons above the text field. It makes it a lot easier to read and has syntax hilighting and stuff:
[source lang="cpp"]cout << "How many times a day do you cin?\n";
int times = 0;
cin >> times;
cout << "Really!? " << times << " times?\nRepeat after me: \"Forgive me console, for I have cin'ed.\"\n";[/source]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement