what do i have to do to make this work?!?!?!?
anyways why do I all of sudden get these 2 errors:
../include/conio.c:28: error: `BLACK' was not declared in this scope
../include/conio.c:29: error: `LIGHTGRAY' was not declared in this scope
what do i have to do to make this work?!?!?!?
anyways why do I all of sudden get these 2 errors:
../include/conio.c:28: error: `BLACK' was not declared in this scope
../include/conio.c:29: error: `LIGHTGRAY' was not declared in this scope
Keyboard Not Found! Press any key to continue. . .
Stop using conio? or at least use it right also maybe post some code.
Woop?
what do you mean by "right"?
and do you want all of the code from conio.c?
thats the part thats giving the trouble i thinkCode:static int __BACKGROUND = BLACK; static int __FOREGROUND = LIGHTGRAY;
Keyboard Not Found! Press any key to continue. . .
If your using dev-C++ which i think you are maybe try this place out it has better implementations of conio.h
http://devpaks.org/list.php?category=Text%20console
Woop?
omg thanks a ton man
Keyboard Not Found! Press any key to continue. . .
<conio> / <conio.h> is non-standard. (It's not part of the ANSI/ISO C++ language standard.) This means that it's not included with every compiler, and each implimentation of <conio> may be different. That said, it is a psudo-standard and most compilers will have it.
If you want to change color or shading (or include graphics), you will have to use something non-standard. Anything beyond plain text is non-standard.
prog-bman is asking you to post your code... not conio.c....maybe post some code.
If simply including <conio> caused the errors, then maybe your compiler is configured incorrectly, or maybe this particular <conio> didn't come with your compiler, and isn't compatible with it???
conio.h is included in dev-cpp. I use it.
And if I am correct int only stores a number. Not letters. char stores letters. so you would want' char var_name = "Black" or something like that.
Actually, no you wouldn't. Internally conio refers to colors by number. BLACK is simply one of several values stored in an enumeration as shown below:Originally Posted by Rune Hunter
Edit: Silly me. Forgot to name the enumeration.Code:enum COLORS { BLACK, BLUE, GREEN, CYAN, RED, PURPLE, YELLOW, WHITE, GRAY, LIGHTBLUE, LIGHTGREEN, LIGHTCYAN, LIGHTRED, LIGHTPURPLE, BRIGHTWHITE };
Last edited by Frobozz; 09-15-2004 at 02:44 PM.
yea i understand the thing about standard/non standard things. for some reason i didnt have that enum colors in conio.h. after prog-bman showedme how to get conio to work i looked at the new source file and the old one and the old one didnt have that enum thing.
Keyboard Not Found! Press any key to continue. . .