I have eclipse C/C++ installed along with MinGW64 on my windows 10. The weird things when I run my code on command prompt, everything looks perfect in the console, when it comes to printf()
or scanf()
.
etting.
There's nothing too strange. Usually, the standard output is line buffered (when connected to a terminal). So, unless you have used a newline
(or, flush manually), the output would be in the buffer, it will not be flushed to terminal.
If you don't want to use fflush()
, you can force flashing by including a newline in your print statement, like
printf("Enter number of rows: \n");
As found in this forum, for MinGW,
added a PATH variable set to C:\MinGW\bin in the Run Configuration
can be tried also.