i am using turboc c++ compiler .how to initialize the graphics drivers .pl
let me know.

Recommended Answers

All 7 Replies

madhub2v,

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?

Dave

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.

thank Q very much

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.

David

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.