Solved

C++ and DOS

Posted on 1998-05-28
7
181 Views
Last Modified: 2010-04-02
Does anyone know how to create programs for dos invironment but run them in a DOS windon?
I want to use graphics, but they do not work under Windows.
0
Comment
Question by:Dmitriy
[X]
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
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 1

Expert Comment

by:Topace
ID: 1164885
Hmmm...it doesn't sound too complicated.  I need to know a few things, though:

1.  Do you have win95?
2.  Do you have a specific program you need to get finished?  (i.e. A piece from the code that references the graphics.)


Topace
0
 
LVL 2

Expert Comment

by:kellyjj
ID: 1164886
You can run graphics in a dos 'shell'.  Which means you have to be full screen dos, not a window.   You still are running win95.
0
 
LVL 1

Expert Comment

by:Topace
ID: 1164887
Yeah, that's basically what I was trying to explain.  I can give you some code to run in DOS, but the graphics are going to be a little hard to come by if you are currently using Visual C++.  VCPP is really easy to use, but it defeats the purpose of C++ in the long run.

Topace
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 3

Author Comment

by:Dmitriy
ID: 1164888
kellyjj, I need a specific header or a code that I should include inside the code that would run the program in the DOS mode and with graphics.  

topace, I have Borland C++ ver.4.5
I have windows 95.  I had  a very simple project to do, but I wanted to include colors as extra. U know, change a background and the text colors...  So I tried to include the header <graphics.h> but got an error telling me that the program could not use colors under windows environment.
0
 
LVL 3

Accepted Solution

by:
vmpn earned 0 total points
ID: 1164889
Hi,
    If you want to use colors and stuff in Borland 4.5 You have to build the DOS executable and not EasyWin. First of all if you do not use proj now, you need to use one. In Borland go to menu Project, New and in type of application select Dos executable. As soon as you do that you will be able to use <graphics.h>.

Sincerely,
VMPN

0
 
LVL 3

Author Comment

by:Dmitriy
ID: 1164890
vmpn,  In target type, I do not see the "Dos executable".  Do you mean Application (.exe)?
0
 
LVL 3

Expert Comment

by:vmpn
ID: 1164891
Try it.

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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.

636 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