| | |
BGI Error:- Graphics not Initialized(Use Initgraph)
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
A wild stab in the dark suggests that you need to double up the second \ in your pathname, so
C:\\TC\\BGI
But since you've only paraphrased the problem, who knows whether that typo exists in your actual code, or whether there is some other problem you haven't bothered to mention. Post actual code if you want a fast accurate response.
> Can somebody pls help me.
http://www.catb.org/~esr/faqs/smart-...ons.html#prune
http://www.catb.org/~esr/faqs/smart-...html#writewell
> Its urgent.
http://www.catb.org/~esr/faqs/smart-...ns.html#urgent
C:\\TC\\BGI
But since you've only paraphrased the problem, who knows whether that typo exists in your actual code, or whether there is some other problem you haven't bothered to mention. Post actual code if you want a fast accurate response.
> Can somebody pls help me.
http://www.catb.org/~esr/faqs/smart-...ons.html#prune
http://www.catb.org/~esr/faqs/smart-...html#writewell
> Its urgent.
http://www.catb.org/~esr/faqs/smart-...ns.html#urgent
of course the BGI is 20+ year old technology first developed for DOS 3 and never meant for use under Windows so it's quite possible even if you called the method that it failed and you didn't properly handle that failure.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
•
•
Join Date: Sep 2009
Posts: 3
Reputation:
Solved Threads: 0
Well , Using the same ancient Turbo C++ 3.0 in school, i ran into the same problem. The two lines of graphics above should be :
Assuming that you installed Turbo C to C:\TC
Obviously include the graphics.h.
If it still doesnt work , Press CTRL-F , then D.
(Dos Shell from the Compiler File Menu).
Write :
It should work now. If it still doesnt work , im pretty sure that its a corrupted installation or you are missing the *.BGI Files.
Also , I think you'd have done this , but dont forget to enable the Graphics Libraries in Options > Linker > Libraries.
Assuming that you installed Turbo C to C:\TC
C Syntax (Toggle Plain Text)
int gd=DETECT,gm; initgraph(&gd,&gm,"C:\\TC\\BGI");
If it still doesnt work , Press CTRL-F , then D.
(Dos Shell from the Compiler File Menu).
Write :
C Syntax (Toggle Plain Text)
C:\TC\BGI exit
Also , I think you'd have done this , but dont forget to enable the Graphics Libraries in Options > Linker > Libraries.
Last edited by ashmew2; Sep 22nd, 2009 at 3:27 am.
•
•
Join Date: Nov 2008
Posts: 90
Reputation:
Solved Threads: 8
You are required to check whether the compiler is installed in c drive or not
if it is installed in other drive u must specify the program as
for eg. it is installed in d drive
and also change the path in the compilers directory
if it is installed in other drive u must specify the program as
for eg. it is installed in d drive
C Syntax (Toggle Plain Text)
d:\\tc\\bgi
![]() |
Similar Threads
- Help needed in graphics.h (C++)
- bgi error (C)
- Graphics.h turmoil (Game Development)
- Help: Outputting Up and down arrows in C++ (C++)
Other Threads in the C Forum
- Previous Thread: need help....urgent.pls
- Next Thread: Bitwise operators
| Thread Tools | Search this Thread |
* adobe api append array arrays bash binarysearch centimeter char character cm copyanyfile copypdffile createcopyoffile createprocess() csyntax directory dynamic execv feet fgets file floatingpointvalidation fork frequency function getlogicaldrivestrin givemetehcodez global graphics gtkgcurlcompiling gtkwinlinux highest histogram homework i/o ide include infiniteloop initialization input interest intmain() iso keyboard kilometer license linked linkedlist linux linuxsegmentationfault list lowest match matrix meter microsoft mqqueue multi mysql oddnumber odf open openwebfoundation overwrite pdf pointer pointers posix power program programming pyramidusingturboccodes read recursion recv recvblocked repetition reversing scheduling segmentationfault send shape single socketprogramming stack standard strchr string strings suggestions test testautomation unix urboc user whythiscodecausesegmentationfault win32api windows.h






