#include<stdio.h>
#include"graphics.h"
#include<stdlib.h>
#include<conio.h>
void main()
{
int graphdriver=DETECT,graphmode;
int color,n,m;
initgraph(&graphdriver,&graphmode);
for(n=0;n<10;n++)
{
putpixel(250+n,350,BLUE);
}
for(m=0;m<10;m++)
{
int x=getpixel(250+m,350);
printf("%d",x);
}
getch();
}
I have to compile programs using graphics.h but i use Microsoft visual studio 6.0 . There is no graphics.h file in it... so i copied it from turbo C. but on compiling there are many errors in the graphics.h file
there is some problem within the graphics.h file itself i couldnt compile my program using turbo c too
the errors are
--------------------Configuration: Text1 - Win32 Debug--------------------
Compiling...
Text1.c
e:\sudipta\engg\4th semester\cg\graphics.h(248) : error C2061: syntax error : identifier 'arc'
e:\sudipta\engg\4th semester\cg\graphics.h(248) : error C2059: syntax error : ';'
e:\sudipta\engg\4th semester\cg\graphics.h(248) : error C2059: syntax error : 'type'
e:\sudipta\engg\4th semester\cg\graphics.h(249) : error C2061: syntax error : identifier 'bar'
e:\sudipta\engg\4th semester\cg\graphics.h(249) : error C2059: syntax error : ';'
e:\sudipta\engg\4th semester\cg\graphics.h(249) : error C2059: syntax error : 'type'
e:\sudipta\engg\4th semester\cg\graphics.h(250) : error C2061: syntax error : identifier 'bar3d'
e:\sudipta\engg\4th semester\cg\graphics.h(250) : error C2059: syntax error : ';'
e:\sudipta\engg\4th semester\cg\graphics.h(250) : error C2059: syntax error : 'type'
e:\sudipta\engg\4th semester\cg\graphics.h(252) : error C2061: syntax error : identifier 'circle'
e:\sudipta\engg\4th semester\cg\graphics.h(252) : error C2059: syntax error : ';'
e:\sudipta\engg\4th semester\cg\graphics.h(252) : error C2059: syntax error : 'type'
e:\sudipta\engg\4th semester\cg\graphics.h(253) : error C2061: syntax error : identifier 'cleardevice'
e:\sudipta\engg\4th semester\cg\graphics.h(253) : error C2059: syntax error : ';'
e:\sudipta\engg\4th semester\cg\graphics.h(253) : error C2059: syntax error : 'type'
e:\sudipta\engg\4th semester\cg\graphics.h(254) : error C2061: syntax error : identifier 'clearviewport'
e:\sudipta\engg\4th semester\cg\graphics.h(254) : error C2059: syntax error : ';'
e:\sudipta\engg\4th semester\cg\graphics.h(254) : error C2059: syntax error : 'type'
e:\sudipta\engg\4th semester\cg\graphics.h(255) : error C2061: syntax error : identifier 'closegraph'
e:\sudipta\engg\4th semester\cg\graphics.h(255) : error C2059: syntax error : ';'
e:\sudipta\engg\4th semester\cg\graphics.h(255) : error C2059: syntax error : 'type'
e:\sudipta\engg\4th semester\cg\graphics.h(256) : error C2061: syntax error : identifier 'detectgraph'
e:\sudipta\engg\4th semester\cg\graphics.h(256) : error C2059: syntax error : ';'
e:\sudipta\engg\4th semester\cg\graphics.h(256) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(256) : error C2059: syntax error : 'type'
e:\sudipta\engg\4th semester\cg\graphics.h(256) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(257) : error C2061: syntax error : identifier 'drawpoly'
e:\sudipta\engg\4th semester\cg\graphics.h(257) : error C2059: syntax error : ';'
e:\sudipta\engg\4th semester\cg\graphics.h(257) : error C2059: syntax error : 'type'
e:\sudipta\engg\4th semester\cg\graphics.h(257) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(258) : error C2061: syntax error : identifier 'ellipse'
e:\sudipta\engg\4th semester\cg\graphics.h(258) : error C2059: syntax error : ';'
e:\sudipta\engg\4th semester\cg\graphics.h(258) : error C2059: syntax error : 'type'
e:\sudipta\engg\4th semester\cg\graphics.h(259) : error C2061: syntax error : identifier 'fillellipse'
e:\sudipta\engg\4th semester\cg\graphics.h(259) : error C2059: syntax error : ';'
e:\sudipta\engg\4th semester\cg\graphics.h(259) : error C2059: syntax error : 'type'
e:\sudipta\engg\4th semester\cg\graphics.h(260) : error C2061: syntax error : identifier 'fillpoly'
e:\sudipta\engg\4th semester\cg\graphics.h(260) : error C2059: syntax error : ';'
e:\sudipta\engg\4th semester\cg\graphics.h(260) : error C2059: syntax error : 'type'
e:\sudipta\engg\4th semester\cg\graphics.h(260) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(261) : error C2061: syntax error : identifier 'floodfill'
e:\sudipta\engg\4th semester\cg\graphics.h(261) : error C2059: syntax error : ';'
e:\sudipta\engg\4th semester\cg\graphics.h(261) : error C2059: syntax error : 'type'
e:\sudipta\engg\4th semester\cg\graphics.h(262) : error C2061: syntax error : identifier 'getarccoords'
e:\sudipta\engg\4th semester\cg\graphics.h(262) : error C2059: syntax error : ';'
e:\sudipta\engg\4th semester\cg\graphics.h(262) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(262) : error C2059: syntax error : 'type'
e:\sudipta\engg\4th semester\cg\graphics.h(263) : error C2061: syntax error : identifier 'getaspectratio'
e:\sudipta\engg\4th semester\cg\graphics.h(263) : error C2059: syntax error : ';'
e:\sudipta\engg\4th semester\cg\graphics.h(263) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(263) : error C2059: syntax error : 'type'
e:\sudipta\engg\4th semester\cg\graphics.h(263) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(264) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(265) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(266) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(266) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(267) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(268) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(268) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(269) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(269) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(270) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(271) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(272) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(273) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(273) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(274) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(275) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(276) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(277) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(278) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(279) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(279) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(280) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(281) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(282) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(282) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(283) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(284) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(284) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(285) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(285) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(286) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(287) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(288) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(289) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(290) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(290) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(291) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(291) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(292) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(293) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(294) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(294) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(295) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(296) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(297) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(297) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(298) : error C4226: nonstandard extension used : 'huge' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(299) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(299) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(300) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(301) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(302) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(303) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(304) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(305) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(305) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(306) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(306) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(307) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(309) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(309) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(311) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(312) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(313) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(314) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(316) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(317) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(317) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(318) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(319) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(320) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(321) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(321) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(322) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(323) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(324) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(325) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(327) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(328) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(330) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(331) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(332) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(334) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(336) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(337) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(338) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(338) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(339) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(339) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(344) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(344) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(356) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(356) : warning C4229: anachronism used : modifiers on data are ignored
e:\sudipta\engg\4th semester\cg\graphics.h(357) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(357) : warning C4229: anachronism used : modifiers on data are ignored
e:\sudipta\engg\4th semester\cg\graphics.h(358) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(358) : warning C4229: anachronism used : modifiers on data are ignored
e:\sudipta\engg\4th semester\cg\graphics.h(359) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(359) : warning C4229: anachronism used : modifiers on data are ignored
e:\sudipta\engg\4th semester\cg\graphics.h(360) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(360) : warning C4229: anachronism used : modifiers on data are ignored
e:\sudipta\engg\4th semester\cg\graphics.h(361) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(361) : warning C4229: anachronism used : modifiers on data are ignored
e:\sudipta\engg\4th semester\cg\graphics.h(367) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(367) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(377) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(377) : warning C4229: anachronism used : modifiers on data are ignored
e:\sudipta\engg\4th semester\cg\graphics.h(378) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(378) : warning C4229: anachronism used : modifiers on data are ignored
e:\sudipta\engg\4th semester\cg\graphics.h(379) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(379) : warning C4229: anachronism used : modifiers on data are ignored
e:\sudipta\engg\4th semester\cg\graphics.h(380) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
e:\sudipta\engg\4th semester\cg\graphics.h(380) : warning C4229: anachronism used : modifiers on data are ignored
e:\sudipta\engg\4th semester\cg\text1.c(9) : error C2198: 'initgraph' : too few actual parameters
Error executing cl.exe.
Text1.obj - 156 error(s), 10 warning(s)