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?
Printable View
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.
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
No, that compiler is very old and only produces DOS programs. You need to find a more recent compiler if you want more colors.Quote:
im using c++ 3.0 compiler with XP.
Is this not enough?
Jim