Solved

VC++ Writing a DOS Program

Posted on 1997-12-27
6
239 Views
Last Modified: 2012-06-27
I just got Microsoft Visual C++ 5.0 a few days ago.  I've been all through the help screens and the project settings boxes, etc.  All I want to know is how do I set MSVC++ 5.0 to create programs that can be run in MS-DOS mode?
0
Comment
Question by:Egore
6 Comments
 
LVL 7

Expert Comment

by:galkin
ID: 1177090
You must create console application. Go to File->Open->New.... In opened dialog box click Projects tab and from list box select "Win32 Console application". Click OK button and skeleton console application will be generated. Then you can write main() function etc. what you usually do in DOS applications.
0
 
LVL 3

Author Comment

by:Egore
ID: 1177091
I tried this, but it did not work.  When I try to use it in the dos prompt it tells me that it cannot be run in DOS mode.  Also, if you answer this, I'll up the points, to use 'union REGS regs' do you need to compile as a DOS program?  Because, when I compile it in VC++ 1.0 as a DOS program it works just fine, but in VC++ 5.0 as whatever the default is, it screams at me when I use 'union REGS regs'.
0
 
LVL 5

Expert Comment

by:yonat
ID: 1177092
VC 4.2 and later do not support 16-bit applications. If you want to write 16-bit applications, use VC 4.1 or 1.52.
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 15

Accepted Solution

by:
Tommy Hui earned 50 total points
ID: 1177093
No, the only version of Visual C++ that supports DOS applications is VC++ 1.x (1.52c was the last version).

You cannot use Visual C++ 2.x, 4.x, or 5.x to create DOS applications.


0
 
LVL 3

Author Comment

by:Egore
ID: 1177094
Well, I was really hoping this wouldn't be the case...  But, thanks anyway.  I'm only giving you an acceptable rating because, well, you didn't really tell me how...  But, thank anyway...
0
 

Expert Comment

by:rafekemmis
ID: 8103172
I have designed a C++ application that creates some REG files and BAT files which are needed for the loading process for 80+ XP machines. My problem is that this application must run in DOS MODE. I am currently using Visual Studio 7 which doesn't seem to support this. Are there any alternatives that can support my use of the conio library? I appreciate any help you can give.
R
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

805 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question