Hello,
In C, using graphics.h, I can only deal with limited number of colors
like
setcolor(int)
is there another way to extend or another source or header file which provide more colors?
Hello,
In C, using graphics.h, I can only deal with limited number of colors
like
setcolor(int)
is there another way to extend or another source or header file which provide more colors?
This header is from Borland's BGI graphics library, which is old and probably unsupported. I found this thread on this same forum with more info:
http://cboard.cprogramming.com/brief...r-turbo-c.html
Anyway, to accomplish your goal (more colors), I would use a different library. Unless you're programming a DOS game to be played on classic computers.
Cross-platform GUI Library examples:
Qt
GTK
Cross-platform game Library examples:
SDL
Allegro
Search those keywords for more information.
> In C, using graphics.h, I can only deal with limited number of colors
If you persist in programming using a DOS compiler, then you're always going to be stuck with the 16/256 colours that DOS could ever deal with.
Use a modern compiler, for your modern OS, which can make the best use of your modern graphics card.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
im using c++ 3.0 compiler with XP.
Is this not enough?
I need resources like objects, codes or header files to improve colors. Is it possible?How?
If you want really do something good, upgrade to C++ and use Direct X or openGl
Code - functions and small libraries I use
It’s 2014 and I still use printf() for debugging.
"Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson
No, that compiler is very old and only produces DOS programs. You need to find a more recent compiler if you want more colors.im using c++ 3.0 compiler with XP.
Is this not enough?
Jim