graphics.h is a Borland-specific header file and not supported by any other compiler. When you write Windows programs you must use win32 api graphics functions, which are completly different than those you learned with graphics.h.
Ancient Dragon
Retired & Loving It
30,050 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
dev c++ compiler does not support any of the functions in graphics.h. You need more than just a .h file -- you will also need a *.lib library file which dev c++ does not support. So even if you get your program to compile it will not link due to lack of libraries.
If you really want to use functions in graphics.h then you have a couple options: (1) use old version of Turbo C/C++ or (2) Upgrade to newest version of Turbo C (I don't know if that version supports graphics.h or not, I doubt it because I think Borland made a 32-bit compiler out of it and graphic.h was for 16-bit MS-DOS operating system)
Ancient Dragon
Retired & Loving It
30,050 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
Well, Borland BGI is available till version 5 of Borland C++ Builder and available with every turbo c++(except the latest 2006 version).
BGI is crap and there is no guarantee that your current code compiles with current dev c++ compiler.
You should rather use system API and DirectX and OpenGL whiich are. I dont have much idea of all these things, but these are most popular.
If you want to use bgi, you can get turbo c++(an older version) for free from borland.
vishesh
Nearly a Posting Virtuoso
1,381 posts since Oct 2006
Reputation Points: 85
Solved Threads: 42
hey, how bout if u try to make it outtextxy(13,13,"a") instead......this function, as far as i know doesn't work without quotes.......
I think it might be.
outtextxy(13,13,"a")
All you need to do is read his request:Now am trying to display something the user enters onto the graphics screen. like if am accepting his initial into 'a' and want to display it. How should i do it
'a' is a variable. It contains what the user typed in. You don't use double quotes around a variable if you want to display what was entered.abhijit11 used the function correctly -- unless he defined 'a' as a single character. But we don't know that. ;)
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944