Dev C++ compiler

  • Thread starter Thread starter ravenosu
  • Start date Start date
R

ravenosu

Guest
Hello, im just getting into programming, so I did a search on the net for free compilers. I found one called Bloodshed Dev C++, downloaded it and then installed it. (latest version, yes)Now, here is my problem:

I made sure that I read the manual on how to compile and such and created some basic programs, you can see the code i used here http://www.halflife2.net/forums/showthread.php?s=&threadid=4669
(find the second code on that page)
I followed it exactly and when i use compile it compiles it just fine. But the problem is running the program. A MS-DOS looking window comes up and I see the cout << that I told it to display but when i enter a number and press enter, the whole screen dissapears (closes). Is this normal?? is the program not programmed right to show the rest of the text I told it to? Is it my compiler? Am I doing something totally wrong here?????

Note: my problem is not just this program, when I try any basic code that asks the user to input a letter or number and press enter, it always closes after I hit enter.

Any suggestions/info on what is going on?? help me i b a noob @ dis! thnx!;(
 
the solution is easy if you are running xp.. :)
You check the properties of the app you want to run, and see that it doesn't close after exit.. :)
XP always close down dos apps after they have been executed..
 
I do not see this uption under the properties, am I missing something?
 
hmm, i just noticed that not all dos apps have that option.. What happens if you run them from the start---->run command?
cmd 'whateverapp'... does that close it when it's run?

[edit]
When i bring up the properties on some dos apps, and choose 'program', i get the option to 'close on exit'. If you untick that, if you have that option, it should be ok. There is also alot more options there to play with, if things don't work as planned.. :)
 
When I go into the folder it is saved in and run it, it still does the same thing (ofcourse) When I goto "run" and type cmd and the file name it just boots up the does prompt window...what to do from there to open program?? (i cant work dos for the life of me)

edit: I dont even have the "program" option under properties of the file.

yah im runnin windows xp proffesional if ya didnt alrdy guess
 
you browse to wherever your file is..
if you need to go to f:\files\test\backup\run_this.bat you type:
f:
f:\cd files
f:\files\cd test
and so on..
then,
f:\files\test\backup\ run_this.bat(or whatever your file is named)
If you need to go back one dir, you just type 'cd..' and press enter.. That should bring you one step back.
And of course 'dir' to see what's in a directory.
You should know dos. :)
Hope that helps..
 
Yah I wasnt thinkin when i replied :dork: hehe

...but they still close less than a 1/2 of a second after program has been executed...thanks for the help, though, appreciate it.
Anyone else have any suggestions, or is it going to have to stay this way?
 
np. You just have to sit tight until someone else can help you, because i'm out of tricks.. :(
 
That's the secret of the hello world program....















;)
nah, it's in the winxp settings, i can't help you more than that, i'm sorry.
 
Back
Top