Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem on DEV C++

Status
Not open for further replies.

ssrc

Programmer
May 20, 2003
5
IN

hi
i am beginner in dev c++. i am getting a problem in DEV C++ (version 4) programming. i am not able to run program. my program is compiled successfully but not getting any output. i checked in the windows application( as they suggested in HELP topic) and then in console(dos). but in the latter, the console is blinking away while run is clicked. how can i run my program?

if u can give steps that will be helpful to me. i have
win-xp system.

thanks

 
ssrc,

At this point, there isn't much I can help you with. Basically this is what you've told me:

1. My code compiles successfully
2. There is no visual indication that my program is running

You haven't said what your program is supposed to do. Could you maybe start by saying whether it's a GUI or a Console program?

(If you're not sure, GUI programs usually have a function called WinMain, and console programs have a function called main.)

Maybe post a little code.

[sub]I REALLY hope that helps.[/sub]
Will
 

last night i have got the instruction in a website how to get the output.
my program ..it was simple

i wrote simply.

#include<iostream.h>

int main()
{ cout<<&quot;c++ is better than c&quot;;
return 0;
}

my problem was to run this code .but at run time the console was blinking away. i could not see the output.

i got in a website
the follwing things:


&quot; ......Method 1 - Scaffolding:
Add the following code before any return statement in main() or any exit() or abort() statement (in any function):

/* Scaffolding code for testing purposes */
cin.ignore(256, '\n');
cout << &quot;Press ENTER to continue...&quot; << endl;
cin.get();
/* End Scaffolding */

This will give you a chance to view any output before the program terminates and the window closes........&quot;

---THIS WORKED. I GOT THE OUTPUT.

method -2 they have suggested to go to command prompt .then to pass parameter etc.

anyway thank you very much for ur reply.
 
Dear SSRC,
I had same prob with Dev-C++.
Insert the line
system (&quot;PAUSE&quot;);
just before return 0;
and this will hold the output screen.
Dev-C++ version 5 is somewhat better and now available.

Quincy2002 is the easiest IDE (integreated development environment) that I have used and free also. The FTP site is often not working so try another day.

Good beginner books available from Amazon.com are:
Sams Teach Yourself C++ in 21 Days Complete Compiler Edition (4th Edition), and
Standard C++ Bible.

Good Luck,
Vince LaPorte






Vince LaPorte
vincentL@acmc.com
Marshall, MN 56258
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top