• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.
  • The forums have been upgraded with support for dark mode. By default it will follow the setting on your system/browser. You may override it by scrolling to the end of the page and clicking the gears icon.

Dev C++

laziassazn

New Member
Joined
Apr 15, 2009
Messages
11 (0.00/day)
So im trying to do some C using Dev C++ i can compile everything fine but when I run the program for instance hello world the screen with my results will only flash for like half a second.

Any thoughts?
 
You have to read input in order to make it hold in a console. Or you run it via command console/kernel which will keep the output on screen.
 
You can either use the following commands before the end of the code so that the output will pause:

cin >> "already declared variable";

or if you feel like unnecessarily using more memory try,

system("pause");
 
This happens because the console runs the command and automatically closes
it after finishing. You can either hard code a pause into your program, which is a
good idea. Or tell it through right click and the options, which isn't a good idea!

I alway use the getchar(); command and some kind of messsage,
cout << "press key!" <<endl; (obv beforehand!)

I don't use the cin command, because it doesn't except enter
and such like keystrokes!
James
 
Last edited:
linking error How to solve it?

Hello Everyone,

I need help.I have some linking error in my c++ program.
I am working on c++ on Linux.I have included all need header files required.
But there is a problem of linking error.
How to solve it?

Can anyone help me out??How to solve this linking error?
 
Back
Top