keep in mind that the snippet you provided passes the prompt string by value, and this may not be desirable, if the prompt string is very long. it's best to pass by (const) reference so that no copy...
Type: Posts; User: Elkvis
keep in mind that the snippet you provided passes the prompt string by value, and this may not be desirable, if the prompt string is very long. it's best to pass by (const) reference so that no copy...
you certainly can, but if you don't want your code littered with stuff like this:
std::cout << "Enter a number:";
int score = ReadScore();
when you could instead have this:
int score =...