Printing a string while asking for the user input

You can print a string right before asking for user input to help give more context in the terminal. Below is the code.

	int GuessA, GuessB, GuessC;
	std::cout << "Please guess 3 numbers (separated by a space): ";
	std::cin >> GuessA >> GuessB >> GuessC;

It shows up as this in the terminal.
2019-05-31_17-25-05

It is an useful information, much cleaner. Thanks for sharing :slight_smile:

1 Like

Privacy & Terms