jinjin12 wrote: |
---|
@douas, did you even read my topic? i said i already know how to stop the output window from disapearing, i just waned to know why it disappearing |
Yes. Did
you even read the
first paragraph in the link I gave you? (I don't believe you did.)
Duoas wrote: |
---|
This is typically a problem on Windows, caused by really dumb IDEs that don't know enough to keep the console open after the program finishes. However, it does strike right at one of the main philosophical problems with the way you are thinking about programming. After all, a console program should be run from the console --else once it terminates, the console should disappear. We'll get to fixing that later. For now, we'll stick with the immediate problem. |
The console represents a hardware device -- a text terminal (keyboard and video display). Programs are much more transient than the hardware (keyboard and video display). When a textual application starts, the
application connects to the
terminal -- not the other way around.
Since windowed (GUI) systems came about, we have had a nice new type of operating environment, where the user need not use a text terminal at all. Combined with something nice called "multitasking" -- the ability to execute and interact with multiple applications at the same time -- the people at Redmond did something smart: If your application requires a text terminal, the OS will
create one (a console window), ready
before your application starts, so that your text application can connect to it and operate properly. Once your application terminates and detaches itself from the console, then Windows does the Right Thing and gets rid of that
unused console window.
The article I posted for you was also in response to your methods of keeping the console window open, which are, frankly,
wrong. Rather than an unfriendly "you're doing it
wrong," I was considerate enough to post the proper ways to do it for you.
True, the article does not say, "this is not an IDE issue," but a simple read would direct you that it is
the way you are thinking -- a console application should be run from the
console (and not any other way) if you want to keep the console around when your program is done.
Now, is that a good enough answer for you? Do you wish to be rude again? Perhaps you ought to consider that
you missed something before casting stones about. If I (or anyone else) did, in fact, misunderstand you, you are much more likely to get a useful answer if you attribute it to a simple misunderstanding rather than an aggressive, "WHY ANSWER IF YOU AREN'T PAYING ATTENTION". You cannot deny that that is effectively the meaning of, "did you even read my topic?" and "i said i already know how to...".
Oh, and now you are on my "ignore" list. Congradulations.