#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)

jesus, man, you don't need to post all 156 identical errors. :confused: in fact you really don't need to post any. because the answer is simple:

rule #1 -- you can not take header files from one compiler's library and plop them into another. this will not work.

"graphics.h" (and "conio.h", too) is non-standard Borland/Turbo trash. and as such, Microsoft's Visual C compiler does not, can not, and will not use it. the sooner you cut your losses and forget all this non-standard crap you learn using Turbo C, the better.

however, if you are being forced to use Turbo C and its obsolete, archaic libraries by your incompetent university's administration, then you better get off MSVC now and go back to using your 1980's era toy computer, and spend your time there to figure out what you're doing wrong.

when you're ready to join the 21st century western world, you'll toss all that Turbo C code away.

.

Edited 6 Years Ago by jephthah: n/a

You can't run Turbo C graphics on another compiler. I couldn't compile your program in Turbo C, since it was missing a parameter (noted on the line in question, below).

But Turbo C is pretty sweet for doing small assignments and programs. I use it a great deal.

The first program below, is yours, the second one is the help example from Turbo C, itself. Yes, it runs in WindowsXP.

/* This is your code. It will not compile, as is, in Turbo C.
#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);  //missing last paramenter!
     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();
*/
//This is the help file from Turbo C, which runs fine in WindowsXP, //with a default install of Turbo C.
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>

int main(void)
{
   /* request auto detection */
   int gdriver = DETECT, gmode, errorcode;

   /* initialize graphics mode */
   initgraph(&gdriver, &gmode, "");

   /* read result of initialization */
   errorcode = graphresult();

   if (errorcode != grOk)  /* an error occurred */
   {
      printf("Graphics error: %s\n", grapherrormsg(errorcode));
      printf("Press any key to halt:");
      getch();
      exit(1);             /* return with error code */
   }

   /* draw a line */
   line(0, 0, getmaxx(), getmaxy());

   /* clean up */
   getch();
   closegraph();
   return 0;
}

i

Comments
no, turbo c is not sweet at all, for anything. it sucks and perpetuates suckiness everywhere its use is forced onto hapless students by incompetent administrators in sloppy Second World programming courses.

Microsoft's Visual C and GCC are both pretty sweet for doing small assignments and programs. I use them a great deal, as does the rest of the First World, whereas nobody in technically competent companies or institutions here in this 21st century use Turbo C.

seriously throw that archaic Turbo C crap away. let it die like it should have already done back in the early 1990's.

We are forced to use turbo c at college I thought that MSVC wouldnt be able to solve the problem. the curriculum allows us to use only graphics.h that is the biggest problem Otherwise I would have used allegro.h I like allegro very much....Never gives problems

We are forced to use turbo c at college

your college forces you to use a substandard compiler and IDE that is 20 years out-of-date, that uses deprecated and obsolete libraries, when modern industry-standard compilers and development environments are freely available in the form of GCC and MinGW.

think about that.

but i applaud you for trying to move to MSVC. you have the potential to break out of this cycle of despair. keep using MSVC whenever you can. if you dont have the full installation, consider checking out the full development CodeBlocks complete with modern graphics libraries and debugger.

Comments
oh yeah!
#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)

/*Please try this*/
1.
#include<stdio.h>
2.
#include"graphics.h"
3.
#include<stdlib.h>
4.
#include<conio.h>
5.
void main()
6.
{
7.
int graphdriver=DETECT,graphmode;
8.
int color,n,m;
9.
initgraph(&graphdriver,&graphmode,C:\\TC\\BGI\\);
10.
for(n=0;n<10;n++)
11.
{
12.
putpixel(250+n,350,BLUE);
13.
}
14.
for(m=0;m<10;m++)
15.
{
16.
int x=getpixel(250+m,350);
17.
printf("%d",x);
18.
}
19.
getch();
20.
}

this thread has been marked solved. if you ahve a qeustion, start a new thread.

and DO NOT post the same kind of crap you posted up there.. it doesnt make any damn sense, and i dont think it's even a question.

DO NOT post 156 error messages. in fact, dont post any. we can figure it out.

DO post formatted and indented code. use the (code) button on the top of the message box that you type your question in.

Edited 3 Years Ago by mike_2000_17: Fixed formatting

If you have to use graphics.h as your header, then AFAIK, you have to use Turbo C.

We can't do anything about your error messages, unless we want to re-write your compiler, and that is not going to happen.

Use Turbo C and I can help you (probably). I use it myself. Otherwise, don't bother posting. You can't make a Beagle into a Great Dane, no matter how hard you try. They're different, and they always will be different.

We are forced to use turbo c at college I thought that MSVC wouldnt be able to solve the problem. the curriculum allows us to use only graphics.h that is the biggest problem Otherwise I would have used allegro.h I like allegro very much....Never gives problems

@sudiptamondal...
hello mate...i can understand you problem. Seems like we are from same university. WBUT. The most weird university around the globe. This university should be 'deleted' from the world before turbo C..:twisted:

Sorry guys for being offtopic, won't do it again.Couldn't resist myself seeing a guy struggling like me(i'm junior though, he's from 4th sem).

Edited 6 Years Ago by urbangeek: n/a

@sudiptamondal...
hello mate...i can understand you problem. Seems like we are from same university. WBUT. The most weird university around the globe.

I'm not sure, but I believe it's multiple universities all over India, Thailand, Indonesia, and a few Eastern European countries.

it's unfortunate, but it is what it is. you can advocate for modern compilers when you can. you can ask uncomfortable questions about why they use obsolete crap, when there are modern full featured IDE's available for little or no cost. or you can lay low and learn all you can despite the poor curriculum.

I suggest you spend your time learning how to do it "right" on a modern development and compiler such as MSVC or CodeBlocks+MinGW. Know that any code that is compilable in a standard-C compiler, will also work on Turbo C.

when they force you to use the archaic crap, like "graphics.h", just do what they require. if you have the motivation, also try to learn to do graphics using the OpenGL or GTK+ libraries. CodeBlocks supports these industry standard graphics libraries. learning them will only benefit you.


.

Edited 6 Years Ago by jephthah: n/a

I'm not sure, but I believe it's multiple universities all over India, Thailand, Indonesia, and a few Eastern European countries.
.

theres an another reason why i said we're from same university. I saw his username sudiptamondal. It's his name: sudipta mondal. Only Bengalis do have this type of name. So if he's bengali(assumed he stays in bengal state), from india doing engineering, 4th semister, then he must be from WBUT. the same board i'm in.

thanks for the link jephtah...i downloaded codeblocks compiler.

Is there any professional software being developed in India with Turbo C compiler? I surely hope not, but I have no way of knowing.

I believe the answer to this problem was mentioned in another thread.

With the TurboC++ 3.x compiler you need to enable the Graphics Library in the Options->Linker->Libraries Menu in order for the graphics functions to compile correctly.

The code looks fine. Just lacks the check box in the drop down menu.

Pretty simple really.

This question has already been answered. Start a new discussion instead.