Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

VC++ Writing a DOS Program

Posted on 1997-12-27
6
246 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Which IDE to use to begin C++ training? 5 65
thread-safe code in c++ 2 115
Error C2678: binary '!=': no operator found... 4 58
Issues with C++ Class 19 101
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

856 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