I need to accomplish the same behavior as .NET Console.ReadLine function provides. The program execution should continue when the user pushes enter key.
The following code is not sufficient, as it requires additional input:
printf ("Press Enter to continue");
scanf ("%s",str);
Any suggestions?
You could use fgets(), like so:
#include <stdio.h>
fgets(buf, sizeof(buf), stdin);