• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 184
  • Last Modified:

C++ and DOS

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
Dmitriy
Asked:
Dmitriy
  • 2
  • 2
  • 2
  • +1
1 Solution
 
TopaceCommented:
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
 
kellyjjCommented:
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
 
TopaceCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
DmitriyAuthor Commented:
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
 
vmpnCommented:
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
 
DmitriyAuthor Commented:
vmpn,  In target type, I do not see the "Dos executable".  Do you mean Application (.exe)?
0
 
vmpnCommented:
Try it.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now