i began learning C++ a while back but have kind of forgotten about it for one reason or another. recently i have been re-inspired and, more specifially, have decided to translate a card game i made up a few years back into the digital world.
i have always had problems with the background color function. since i need it to work now (because what is a computer card game without the traditional green background) i have finally decided to ask someone what it is i am doing wrong.
so far (because i havent started on the game yet, and am merely trying to get my background green) this is all the code i have:
ive tried moving the function before the initwindow(), after it, in the while loop, but still all i get is a 800x600 black window.Code:#include <stdio.h> #include <winbgim.h> int main() { initwindow(800,600); setbkcolor(GREEN); //also tried "setbkcolor(2);" while ( !kbhit() ){} return 0; }
any help?
(and, as you may have gathered from my code, i am using Dev C++ with the winbgim graphics library, which is almost identical to borland's graphics.h)