dimanche 30 mai 2021

Need to press enter for my console C++ code to continue executing on windows cmd

I have written a c++ code that sends logs to the console using cout. the issue is that i have sometimes to press enter so my code can continue executing and display next logs. for information, there is absolutely no input request in my code (cin or other).

I tried to use '\n' instead of endl. I also disabled inputs using this function:

FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE));

but the issue still persists (the console still waits for me to press enter to continue executing the code...). Could you please help?

thanks in advance

Aucun commentaire:

Enregistrer un commentaire