Chapter 3 quiz ambiguous question

image

I find this an ambiguous question. Consider:

void print_values() {
  std::cout << values_ << std::endl;
}

Imo. void is a return type, rather than a variable type, as you cannot define a variable of type void. So I consider it correct that the simplest c++ function definition does not have a variable type.

Hi @JRTG ,

Thanks for pointing this out.

I’ve updated the options now the remove ambiguity:

  • return type
  • parenthesis
  • function name
  • none of these

Cheers.