Re: [Dev-C++] clrscr() and c99 compatibility
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Matthews <dem...@uw...> - 2002-09-24 12:16:26
|
Thanks for the linker information. clrscr() along with textcolor() and
gotoxy() work fine now. :)
Code snippet: This happened several times with me, so I'm quite interested
to find out the reason why.
sample code:
void log_in(void)
{
clrscr();
printf("User login: ");
char login[80];
gets(login);
int c;
c = atoi(login);
if (c != 0 || c != 1 || c != 2) {
clrscr();
printf("Invalid login.");
for (;;) {
if (kbhit()) break;
}
}
}
And it would give me a parsing error at "char login[80]" every time.
What's up?
At 12:30 PM 23/09/2002 +0200, you wrote:
>Hi Matthews
>
>>I recently downloaded the new dev-c++ beta version, and am a bit stuck.
>>Looking through the included header files, I found a prototype for the
>>clrscr() function in conio.h, but trying to use clrscr() resulted in a
>>linker error. What header do I need to include to use clrscr()?
>
>You don't need more headers. You just have to link with libconio.a
>
>Linker errors are not related with missing ".h" headers. In this case, you
get *compiler* errors, not
>*linker* ones.
>
>Project options/Linker options : -lconio
>
>>Also, I believe dev-c++ to be C99 compatible, but how come when I tried to
>>declare "char choice" halfway down a function, it gave me a parsing error?
>>C99 was supposed to allow variable declarations anywhere in the code.
>
>No problem here. Can you make a cut&paste of the snippet that causes you
the problem ?
>
>Kind regards
>
>--
>Seb
>
>
>
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by:ThinkGeek
>Welcome to geek heaven.
>http://thinkgeek.com/sf
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|