C++ Functions

I need help in this question

Write a function prototype for a function that prompts the user to type a number, which is then returned as a result. The text of the prompt that the user sees is a function argument, but if that message is not provided the default message is Enter a number:
A function prototype is just a declaration.

int function(); is a suitable prototype for the function you have described.
Actually don't forget the required parameter: int my_function(std::string_view message = "This is my default message: ");.

Topic archived. No new replies allowed.