This looks suspicious:
Code:
if(choice < '1' || choice > '8' && choice != 'q')
If I remember correctly, && has higher precedence than ||, so that might not do what you want. (Try entering '9', it might break.) Even if it's correct it can be a good idea to parenthesize expressions where both && and || are involved (gcc even gives you a warning if you don't, if you want that particular warning enabled).
Also the if's condition is repeated in the while later on. I'd be inclined to make the loop infinite and use a break statement (as you've done with the outer for(;;) loop). Just a matter of style, some people dislike break/continue, but I prefer it to duplicated code.
Instead of lots of cout statements you can always write
Code:
std::cout << "hello there\n"
<< "again\n"
<< "and bye.\n";
or even
Code:
std::cout << "hello there\n"
"again\n"
"and bye.\n";
(The preprocessor concatenates string constants that are separated only by whitespace.)
Finally: the secret about switch statements? Arrays are often more convenient. For example:
Code:
const char *message[] = {
// '1'
"Comment for '1'\n"
"some text\n"
"and some more text.\n",
// '2'
"Comment for '2'\n"
// ...
};
if(choice >= '1' && choice <= '8') {
std::cout << message[choice - '1'];
}
Note that '0', '1', ... are guaranteed to be contiguous so there's no problem with this.