No such file or directory

Reply

Join Date: Apr 2005
Posts: 129
Reputation: some one is an unknown quantity at this point 
Solved Threads: 0
some one some one is offline Offline
Junior Poster

No such file or directory

 
0
  #1
Nov 12th, 2005
  1. #include <conio.h>
  2. #include <graphics.h>
  3. #include <stdlib.h>
  4. #include <stdio.h>
  5.  
  6. void main (int)
  7. {
  8. int gdriver=DETECT,gmode,errorcode; //Requesting auto-detection.
  9. int midx,midy,x;
  10. //Initializing graphics and local variables.
  11. initgraph(&gdriver,&gmode,"d:\\bc3\\bgi");
  12. //Reading result of initialization.
  13. errorcode=graphresult();
  14. if(errorcode!=grOk)
  15. //An error occurred.
  16. {
  17. printf("Graphics error occurred : %s \n",grapherrormsg(errorcode));
  18. printf("Press any key to stop : ");
  19. getch();
  20. exit(1); //Terminate the program due to error.
  21. }
  22. /*Changing the foreground color.
  23. Note : Press enter to exit the last screen as it is black and
  24. it may appear as if the program has stopped running.*/
  25. for(x=15;x>=0;x--)
  26. {
  27. setcolor(x);
  28. circle(20+(x*40),200,15);/*Changing x-coordinate by 50 each time so that
  29. the circles do not overlap.*/
  30. getch();
  31. }
  32. cleardevice(); //Clearing the screen in the graphics mode.
  33. circle(200,200,50);
  34. getch();
  35. closegraph();
  36. }

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

please help
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 1,496
Reputation: WolfPack has a spectacular aura about WolfPack has a spectacular aura about WolfPack has a spectacular aura about 
Solved Threads: 104
Moderator
WolfPack's Avatar
WolfPack WolfPack is offline Offline
Mentally Challenged Mod.

Re: No such file or directory

 
0
  #2
Nov 12th, 2005
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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,362
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1464
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
Still Learning

Re: No such file or directory

 
0
  #3
Nov 12th, 2005
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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 129
Reputation: some one is an unknown quantity at this point 
Solved Threads: 0
some one some one is offline Offline
Junior Poster

Re: No such file or directory

 
0
  #4
Nov 12th, 2005
thanks you mean that i can not use this library
would you give me another one please
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,362
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1464
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
Still Learning

Re: No such file or directory

 
0
  #5
Nov 12th, 2005
Originally Posted by some one
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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 129
Reputation: some one is an unknown quantity at this point 
Solved Threads: 0
some one some one is offline Offline
Junior Poster

Re: No such file or directory

 
0
  #6
Nov 13th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,362
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1464
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
Still Learning

Re: No such file or directory

 
0
  #7
Nov 13th, 2005
Originally Posted by some one
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?
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 129
Reputation: some one is an unknown quantity at this point 
Solved Threads: 0
some one some one is offline Offline
Junior Poster

Re: No such file or directory

 
0
  #8
Nov 13th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 1
Reputation: jyotijain1985 is an unknown quantity at this point 
Solved Threads: 0
jyotijain1985 jyotijain1985 is offline Offline
Newbie Poster
 
-2
  #9
20 Days Ago
Originally Posted by some one View Post
  1. #include <conio.h>
  2. #include <graphics.h>
  3. #include <stdlib.h>
  4. #include <stdio.h>
  5.  
  6. void main (int)
  7. {
  8. int gdriver=DETECT,gmode,errorcode; //Requesting auto-detection.
  9. int midx,midy,x;
  10. //Initializing graphics and local variables.
  11. initgraph(&gdriver,&gmode,"d:\\bc3\\bgi");
  12. //Reading result of initialization.
  13. errorcode=graphresult();
  14. if(errorcode!=grOk)
  15. //An error occurred.
  16. {
  17. printf("Graphics error occurred : %s \n",grapherrormsg(errorcode));
  18. printf("Press any key to stop : ");
  19. getch();
  20. exit(1); //Terminate the program due to error.
  21. }
  22. /*Changing the foreground color.
  23. Note : Press enter to exit the last screen as it is black and
  24. it may appear as if the program has stopped running.*/
  25. for(x=15;x>=0;x--)
  26. {
  27. setcolor(x);
  28. circle(20+(x*40),200,15);/*Changing x-coordinate by 50 each time so that
  29. the circles do not overlap.*/
  30. getch();
  31. }
  32. cleardevice(); //Clearing the screen in the graphics mode.
  33. circle(200,200,50);
  34. getch();
  35. closegraph();
  36. }

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
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC