I think you miss-understood what I meant. After a little digging it looks like graphics.h and initgraph are from a strictly dos/turbo c library.
Your problem is very much linked to the fact that dos has changed. You can either program in a dos emulator, or find a new graphics library to use when you are programming.
You might take a look at SDL to see if it does what you need it to.http://www.libsdl.org/
Then you will be able to use any compiler, any OS, and quite a few languages.