Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 29-04-2010, 11:47 AM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: Feb 2009
Posts: 36
Default C graphics wont work on my pc


Hello

I have an issue C graphic programming. I have simple circle drawing program. You can view the program code at: http://testsrikanth.ipower.com/CIRCLES.txt . I m using Borland C 3.0 version. When I compile it doesn't have any errors. However, When I Run the program, it show blank window and close automatically. Please help me how to run graphics in C program. I am using Atom processor.

Thanks
Srikanth Shet
srishet is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 30-04-2010, 10:38 AM   #2 (permalink)
paralinux
 
Join Date: Jul 2008
Location: Noida
Posts: 86
Default Re: C graphics wont work on my pc

which operating system are you using ?
if its newer than windows xp .. I am afraid you won't be able to run the code.
but if you are using xp ...
the problem could / should be in the path specified in initgraph(&gd, &gm,"")
the thing under quotes is supposed to be
"c:\\tc\\bgi" if your bgi (borland graphics) files are in this directory.

P.S change the path accordingly. It should work.

hope this helps
__________________
http://bhanuvrat.blogspot.com

Digit Community Advisory Council
anuvrat_parashar is offline  
Old 30-04-2010, 12:28 PM   #3 (permalink)
Right Off the Assembly Line
 
Join Date: Feb 2009
Posts: 36
Default Re: C graphics wont work on my pc

I am using Windows XP SP3 Operating System. Could you please tell me how to change the path. I m using Boraland C and it is installed on D:\ drive. However, I have changed the directories of Library, output, include in the Option Menu of C program.
srishet is offline  
Old 01-05-2010, 12:17 AM   #4 (permalink)
paralinux
 
Join Date: Jul 2008
Location: Noida
Posts: 86
Arrow Re: C graphics wont work on my pc

xp .. every thing should work fine.
borland C 3.0 .. isn't it called Turbo C++ 3.0?
anyways .. for making things work, as I have already told you. you just need to change the third parameter of the initgraph function. This is what your function should look like:

Code:
initgraph(&gdrive,&gmode,"d:\\tc\\bgi");
the job of the third parameter is to indicate the location of borland graphics interface (bgi) files, mainly egavga.bgi (the driver)

if you don't want to make this change you may also copy the files present in \\bgi folder to the output folder .. (probably the \\bin folder)

this should make it work
__________________
http://bhanuvrat.blogspot.com

Digit Community Advisory Council
anuvrat_parashar is offline  
Old 01-05-2010, 10:00 AM   #5 (permalink)
Right Off the Assembly Line
 
Join Date: Feb 2009
Posts: 36
Default Re: C graphics wont work on my pc

Thank you very much sir. I really appreciated. It works. I just copied the file egavga.bgi to Bin Folder. Once again thank you sir.
srishet is offline  
Old 01-05-2010, 07:09 PM   #6 (permalink)
paralinux
 
Join Date: Jul 2008
Location: Noida
Posts: 86
Default Re: C graphics wont work on my pc

if in future you would like to incorporate graphical fonts in your 16 bit program .. then copy the font file too to the output directory.

and you're welcome ... anytime
__________________
http://bhanuvrat.blogspot.com

Digit Community Advisory Council
anuvrat_parashar is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Low end Graphics Card recommendations ojha_riddhish Graphic cards 12 13-04-2010 09:45 PM
graphics card Jaskanwar Singh Graphic cards 5 02-03-2010 06:07 PM
Intel May Enter Graphics Processor Market in Late-2008 or 2009 – Rumour s18000rpm Technology News 5 10-02-2007 07:53 PM
External Graphics Card s18000rpm Technology News 8 08-01-2007 04:01 PM
Help me buy a graphics card cybershastri Graphic cards 5 25-01-2005 08:39 AM

 
Latest Threads
- by Charan
- by Charan
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 03:17 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2