C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28695
Number of posts: 94715

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
problem with c++ graphics Posted by djpalshikar on 8 Jul 2008 at 4:19 AM
i am using tuboc3,.. whenever i run a program with graphics it does compile without any errors .....but after this the dos window is closed automatically
and i am back to windows xp..ie i dont get any output ...
i have enabled the graphics option and the initgraph() has the correct path to the bgi folder.


Report
Re: problem with c++ graphics Posted by Lundin on 8 Jul 2008 at 8:36 AM
Type getchar() at the bottom of your program. If that doesn't work, you will have to post more details and/or the code, or it is impossible to tell why it doesn't work.

But note that Turbo C is an extremely old compiler for DOS. There are no guarantees that DOS programs will work on modern Windows computers. DOS has been obsolete for 14 years now... might be time to consider Windows programming instead.
Report
Re: problem with c++ graphics Posted by djpalshikar on 10 Jul 2008 at 6:43 AM
actually the same code used to work with my previous PC which had xp...
but i am now definitely switching to windows....
thanku

Report
Re: problem with c++ graphics Posted by Lundin on 11 Jul 2008 at 6:37 AM
The classic problem with the dinosaur BGI programs was the file called egavga.bgi. If the program can't find this file (usually found under TC\BGI\), it will not work. Best option is to include it in your TC project and link it together with the program.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.