954,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

No such file or directory

#include <conio.h>
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>

void main (int)
{
int gdriver=DETECT,gmode,errorcode; //Requesting auto-detection.
int midx,midy,x;
//Initializing graphics and local variables.
initgraph(&gdriver,&gmode,"d:\\bc3\\bgi");
//Reading result of initialization.
errorcode=graphresult();
if(errorcode!=grOk)
//An error occurred.
{
printf("Graphics error occurred : %s \n",grapherrormsg(errorcode));
printf("Press any key to stop : ");
getch();
exit(1); //Terminate the program due to error.
}
/*Changing the foreground color.
Note : Press enter to exit the last screen as it is black and
it may appear as if the program has stopped running.*/
for(x=15;x>=0;x--)
{
setcolor(x);
circle(20+(x*40),200,15);/*Changing x-coordinate by 50 each time so that
the circles do not overlap.*/
getch();
}
cleardevice(); //Clearing the screen in the graphics mode.
circle(200,200,50);
getch();
closegraph();
}


i have one erorr
fatal error C1083: Cannot open include file: 'graphics.h': No such file or directory
Error executing cl.exe.

please help

some one
Junior Poster
129 posts since Apr 2005
Reputation Points: 10
Solved Threads: 0
 

Looks like you dont have it given by the Visual C++ Compiler. Some old versions of Borland had it. But I dont think not now.

WolfPack
Postaholic
Moderator
2,051 posts since Jun 2005
Reputation Points: 572
Solved Threads: 115
 

graphics.h was non-standard 16-bit Borland compiler specific. M$ compilers never supported it. You will probably have to download free copy of Turco C to compile that program.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

thanks you mean that i can not use this library
would you give me another one please

some one
Junior Poster
129 posts since Apr 2005
Reputation Points: 10
Solved Threads: 0
 
thanks you mean that i can not use this library would you give me another one please

The days of directly accressing windows memory are gone! For MS-Windows, there is OpenGL which I think is free, DirectX and DirectDraw, both free from Microsoft. All are very complex libraries.

you can also call win32 api functions to draw graphics. I think you can find several tutorials if you google for them.

There is also QT, which is a os-independent way of going graphics. Free for home use, but not free for commercial use.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

sorry but i do not know how to make what you say
i want this program to design my program which written in c++ language

some one
Junior Poster
129 posts since Apr 2005
Reputation Points: 10
Solved Threads: 0
 
sorry but i do not know how to make what you say i want this program to design my program which written in c++ language

everything I mentioned can be used by C++. Its just that they are all somewhat difficult to use and will require a solid understanding of c++ language, not really intended for newbes :rolleyes: Afterall you can't play a Beethovan's Concertos if you know nothing about music, so what makes you think you can write complicated graphics programs with no (or little) knowledge of a programming language?

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

thanks for encarge me however i am just a biggener am not aprofissional i try hard to teach my self
any way thank you very very much :confused:

some one
Junior Poster
129 posts since Apr 2005
Reputation Points: 10
Solved Threads: 0
 
#include <conio.h>
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>

void main (int)
{
int gdriver=DETECT,gmode,errorcode; //Requesting auto-detection.
int midx,midy,x;
//Initializing graphics and local variables.
initgraph(&gdriver,&gmode,"d:\\bc3\\bgi");
//Reading result of initialization.
errorcode=graphresult();
if(errorcode!=grOk)
//An error occurred.
{
printf("Graphics error occurred : %s \n",grapherrormsg(errorcode));
printf("Press any key to stop : ");
getch();
exit(1); //Terminate the program due to error.
}
/*Changing the foreground color.
Note : Press enter to exit the last screen as it is black and
it may appear as if the program has stopped running.*/
for(x=15;x>=0;x--)
{
setcolor(x);
circle(20+(x*40),200,15);/*Changing x-coordinate by 50 each time so that
the circles do not overlap.*/
getch();
}
cleardevice(); //Clearing the screen in the graphics mode.
circle(200,200,50);
getch();
closegraph();
}

i have one erorr fatal error C1083: Cannot open include file: 'graphics.h': No such file or directory Error executing cl.exe.

please help


how can we remove the error-no such file or directory for graphics.h.plz help me

jyotijain1985
Newbie Poster
1 post since Nov 2009
Reputation Points: 9
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You