0

I am aware that this is something that has been asked repeatedly, and that conio is outdated, it is completely non-standard, but I need do use BGI graphics(in Turbo C++ 3) for my school project and for that along with BGI I need conio too..

I convinced my teacher to let me use CodeBlocks/MinGW, but the graphics is the part that's giving problems.
I've got 3 days left and desperately need to get it working ..

Porting the entire code to Turbo C++ from codeblocks is not an option :(

I'm using WinBGIm with codeblocks, and it seems to work well..
However, some of the code requires functions like textcolor(), cprintf(),etc that require conio.h..

I've tried the conio libraries from here : http://conio.sourceforge.net/ and http://www14.brinkster.com/aditsu/console/ (copied the requisite files to the include folder, the lib folder, and added the linker parameters), but I get this error regarding the new conio.h

error: conflicting declaration 'BLACK'
error: 'BLACK' has a previous declaration as `colors BLACK'
error: declaration of 'BLACK'
error: conflicts with previous declaration `colors BLACK'

and so on for all colours

and then

'More errors follow but not being shown'

Am I missing something?
Please Help!!

1
Contributor
1
Reply
3
Views
6 Years
Discussion Span
Last Post by anantk
0

There were double declarations for the colours enum in both graphics.h from winbgim and conio.h that was causing the conflict..
Deleted the one in conio.h.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.