constconstexpr int number_of_questions = 20;
string questions[number_of_questions];
const int number_of_questions = 20;
string questions[number_of_questions];
constexpr int number_of_questions = 20;
string questions[number_of_questions];
Make sure std::getline
actually read the value. Don't writecommit the read in value to your destination array-in values until you've ensured all values were read correctly.
Since you never use exists
, you can omit it and evaluate the temporary returnedevaluated from std::find
the expression.
Make sure std::getline
actually read the value. Don't write the read in value to your destination array until you've ensured all values were read correctly.
Since you never use exists
, you can omit it and evaluate the temporary returned from std::find
.
Make sure std::getline
actually read the value. Don't commit the read-in values until you've ensured all values were read correctly.
Since you never use exists
, you can omit it and evaluate the temporary evaluated from the expression.