you're including winbgim.h
that means you're using WinBGIm
WinBGIm is a Windows C++ graphics library based on the classic Borland Graphics Interface (originally distributed with Borland's Turbo Pascal and later with their Turbo C compilers).
http://www.cs.colorado.edu/~main/bgi/install.html
I have no idea how old it is or if its up to date
you might not be able to get it working at all
but here's some info
http://winbgim.codecutter.org/
I don't know what you'll have to do to get it to work, but look through all these links.
here's some info on getting it to work with Dev C++ (which is a really, really old compiler and nobody uses it because its so out of date, but maybe it will help you get it setup for whatever compiler you are using)
http://www.cs.colorado.edu/~main/bgi/dev-c++/
here's some stuff on someone trying to get it to work with codeblocks
http://forums.codeblocks.org/index.php?topic=18822.0
http://www.cplusplus.com/forum/beginner/7409/
and here's another Dev C++ project
/watch?v=E13lgVGWcxg
https://www.youtube.com/watch?v=E13lgVGWcxg
there's a link to the source code in the "about" of that video