stu nicholls dot com | menu - Professional dropdown #3

click here
graphics in c++
#include < stdio.h >
#include < graphics.h >
#include < stdlib.h >
#include < conio.h >

char *dname[]={"requests detection",
	       "a CGA",
	       "an MCGA",
	       "an EGA",
	       "a 64K EGA",
	       "a monochrome EGA",
	       "an IBM 8514",
	       "a Herculer monochrome"
	       "an At&T 6300PC",
	       "a VGA",
	       "an IBM 3270 PC"
	       };
  int main()
  {
  int gdriver,gmode,errorcode;
  detectgraph(&gdriver, &gmode);
  errorcode=graphresult();
  if (errorcode < 0){
    printf("Graphic error: %s\n",grapherrormsg(errorcode));
    printf("Press any key to halt");
    getch();
    exit(1);
    }
    clrscr();
    printf("Driver %s :",dname[gdriver]);
    printf("Press any key to halt");
   // getch();
int gd=DETECT,gm;
initgraph(&gd, &gm,"D:/TC11-11-/BGI");
circle(330,180,100);
getch();
closegraph();
restorecrtmode();
    return(0);
    }
Some more examples
GO BACK  

Our aim is to provide information to the knowledge seekers. 

Footer1