Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I see an the output of my C programs using Dev-C++?

Tags:

c

dev-c++

I'm looking to follow along with The C Programming Language (Second Addition) on a machine running Vista.

So far, I've found Dev-C++ the easiest IDE to do this in. However, I still have one problem. Whenever I run my compiled code, for example: a simple hello world program, it runs, but the console window just flickers on the screen, and I can't see the output.

How can I see an the output of my C programs using Dev-C++? I found a C++ specific solution, System("pause"), and a really ugly C solution, while looping fflush(stdout), but nothing nice and pretty.

like image 718
deeb Avatar asked Mar 02 '10 19:03

deeb


1 Answers

I put a getchar() at the end of my programs as a simple "pause-method". Depending on your particular details, investigate getchar, getch, or getc

like image 57
abelenky Avatar answered Nov 02 '22 18:11

abelenky