I am looking to follow along with the C programming language (second add-on) on a Vista machine.
So far, I have found that Dev-C ++ is the easiest IDE for this. However, I still have one problem. Whenever I run my compiled code, for example: a simple hello world program, it starts, but the console window just flickers on the screen, and I do not see the output.
How can I see the output of my C programs using Dev-C ++? I found a special solution in C ++, System("pause")and a really ugly C solution, whilelooping fflush(stdout), but nothing nice and beautiful.
System("pause")
while
fflush(stdout)
Windows, , . (, , ), , , .
, ; IDE , , . , Dev-++ .
, Dev-++ , Dev-++ Sourceforge. "Read First", . .
, Dev-++ . . Dev-++ V++ 2005 Express, , 10 , 2005 . , .
getchar() " ". getchar, getch getc
getchar()
getchar
getch
getc
#include conio.h
getch(); return 0;
getch();
return 0;
, IDE. (- > → Cmd.exe → ), cd , , . , , , .
Cmd.exe
cd
, , , , .
Dev-++ , : -
#include <stdlib.h>
, , , }
system("PAUSE");
" , ..."
#include : getch();
( → → cmd, cd ) getchar() , , Enter. Windows system("pause"), " enter ..." ( - ).
cmd
system("pause")
getchar(); system("pause"); return 0; . .
getchar();
system("pause");
; ...
#include <iostream> using namespace std; int main () { int x,y; // (Or whatever variable you want you can)
;
cout << result
( ); getchar .
getchar(); }
.cpp ctrl + f 9 , ctrl + f 10 . . "Enter", .
,
Ctrl + h, "" .
, system("pause"); Windows.
system("PAUSE") , #include<stdlib.h>.
system("PAUSE")
#include<stdlib.h>
, c , , , stdlib.h "system (" PAUSE "); , , . . c 5 6, .. 30, .
#include <stdio.h> #include <stdlib.h> int main() { int a,b,c; a=5;b=6; c=a*b; printf("%d",c); system("PAUSE"); return 0; }
, .