Answer the question
In order to leave comments, you need to log in
Entering NULL value in C++?
There is a program that uses std::cin >> variable;
.
Why doesn't the program continue when I don't enter anything? I want to get a NULL value, but the function prompts me to enter further.
Answer the question
In order to leave comments, you need to log in
because when you press enter, you type \n, which is also just a character, and it is skipped. NULL is \0.
I don’t really know what to use, I understand that you need to interfere with work with streams, for example, use cin.get()
Because the program waits for a string to be entered and RETURN to be pressed .
You can use the GetKeyState function to determine which keyboard button is currently pressed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question