-
Console VS MS DOS window
What are the differences between a "Console Application" and a MS-DOS program?
When I go into Visual C++ and create a Cpp source file and run it, it runs in a window that kind of looks like an MS-DOS window, but when I go to close it, it does not give me the message "Windows cannot automatically shut down this program automatically...Do you wish to terminate the program and lose any unsaved information?"
However when I run the same program in Borland C++ (5.5 I believe) it runs it in a MS-DOS window and it DOES give me the "Windows cannot automatically shut down this program automatically...Do you wish to terminate the program and lose any unsaved information?"
Is Visual C++ really running it in a Console window?
Is Borland C++ really running it in a MS DOS window?
Is there even a difference?
Thx,
Blah
-
In windows.......guess what.......they are all console windows.....
I guess the reason why Borland doesnt shutdown properly is that theres a seperate process running with it that hasnt been closed (Command interpretor, debugger?????...I dont know).......I dont use Borland and I have no experience of your problem so I am just kind of guessing there...but in answer...yes they are all console windows
-
here's what happens, Both of the execute a MS-DOS window. But my guess as far as the error message is this, Visual C++ opens a window outside the program wich makes it so that WINDOWS is running the DOS window. If you have played an old MS-DOS game and decided to close it without exiting, you will get the same error. Im guessing Borland opens a msdos window INSIDE the borland program or otherwise uses a program to start your program. (Prolly the compiler).
-
but wouldn't both compilers be doing the same thing? since they are both 32 bit, they create VMs for the console windows? the problem would be how windows closes the console.
-
two types of dos
well...when you do it with borland and you set the final EXE file to be a DOS application...it can still run from within windows but it will give you that error because you are not exiting the program from within the program. If you try to run that application that gave you the error on a pure DOS computer (or in the real DOS mode ie.Restart in MS-DOS mode), then it would work....However if you tried to run the Visual C++ application on a pure DOS computer ... it wouldn't. It's called an EasyWin application.
This is all because Windows can usually support DOS Programs. That's how we can play our games (DOS MODE) from within Windows.
At least I think so. :o
-
it does that so people won't get their computer doesn't screw up. If it is in the middle of loading or saving to a file, and you just close it, it could screw up the file. Or if you are in the middle of calling an interrupt, it could screw up stuff. DOS isn't like Windows, where you got a set of instructions for what to do when you close the program, because DOS wasn't designed for a multitasking environment.
Borland C++ makes pure DOS applications. If it is 32bit like you said, it probably puts it into protected mode to run it, like DJGPP does. Visual C++ makes a console. Console windows are just Windows programs, but it simultates the DOS environment. Since it's in windows, you don't get the message.