Friday, July 31, 2009

Using graphics.h turbo c... help!!!?

I was makinga program using graphics header. But when I compile it, all I got is a quick message saying that there's BGI error:Graphics not initialized (use initgraph)... Is there any explanation about this?? What will I do to solve this problem? I already searched other search engines but none of them worked...Pls. help me...

Using graphics.h turbo c... help!!!?
"None of them worked"?





I found this on my first search on Google:





http://www.mycplus.com/Programming-News-...





I think you'll find that the searches work just fine - it's your search technique that "doesn't work".





Rawlyn.
Reply:oh don't worry.. its just that u forgot to mention the complete path of the bgi folder. even if u did, u might have forgotten about escpae sequences. so, if the path is c:\tc\bgi you should give "c:\\tc\\bgi"





once u 'make' the program and convert to exe file, u can copy it to the bgi folder itself and run even if the path is changed(or different in some other comp)..but outside the folder, ur program checks for the exact path u give.
Reply:You should make sure that the you point to the 'BGI' directory properly depending on where you install you C compiler. From the codes below, you must make sure that the 'BGI' derectory is in F:\\tc\\bgi.





int gd= DETECT, gm, errorcode;


initgraph(%26amp;gd,%26amp;gm,"F:\\tc\\bgi");





Free C/C++ codes here: http://smartcoder.awardspace.com/categor...








KaBalweg


http://smartcoder.awardspace.com


No comments:

Post a Comment