6 Years
Discussion Span
Last Post by daviddoria


Welcome to DaniWeb!

Can you please be more specific with your question? Which operating system are you using? Which GUI system are you planning to use? What exactly are you trying to do?


int main()
  int gDriver=DETECT; //Detect the top priority graphic Driver.
  int gMode;
  initgraph(&gDriver, &gMode, <path to bgi directory: string>); //Initialize the graphic Mode.
  //Do something
  closegraph(); //Terminate graphic mode.
  restorecrtmode();//<--This is important. Restore to previous mode (Text mode)
  return 1;

This should be sufficient but BGI graphics are unsupported in 32-bit compilers & so I guess you are coding with an obsolete TurboC++ compiler. Chuck it.
And please in future be more elaborative in your explanations.


windows xp OS.
simple c program .
i dont have graphics driver installed.
i have just C compiler.

i dont have graphics driver installed.
i have just C compiler.

I assume you have TC. Dig into it's directories there should be a BGI Folder. Give it's path.


we have an assignment in computer programming .we will do images in c++ .can you give source code in creating a line,circle,coloring,other shape,how to fill it with color .i'll wait for your answer .monday its our deadline so i should do it now .thanks!


@madhub2v - please use real English words. "Thank Q" is not a word.

@apee_mimi - Welcome to DaniWeb! You have done what we call "thread hijacking". That is, you've asked a question unrelated to the original post at the bottom of a thread. You should, instead, start your own thread.


This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.