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 is a discussion on How to increase Colors(More Colors)? within the C Programming forums, part of the General Programming Boards category; Hello, In C, using graphics.h, I can only deal with limited number of colors like setcolor(int) is there another way ...
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:
graphics.h under Turbo C
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.
I support http://www.ukip.org/ as the first necessary step to a free Europe.
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 2013 and I still use printf() for debugging.
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