Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Implicit declaration of function 'clrscr' is invalid in C99 ???

Ι get this message when I use commands like clrscr(); system("pause"); etc...

any solutions

X-Code-OTHER, Mac OS X (10.7.3)

Posted on Mar 9, 2012 4:18 PM

Reply
Question marked as Best reply

Posted on Mar 9, 2012 4:38 PM

#include <stdlib.h>


Will get system() past the warning, I don't know for clrscr().

8 replies

Mar 11, 2012 6:26 PM in response to stel_0

OK, I'll try to explain it as simply as I can.


You can't install it.


"conio" (from CONsole I/O) was a C language module provided by Borland in the (now ancient) Borland C and Turbo-C compilers. The purpose of conio was to provide certain functions that would make it easier to make text-based user interfaces in the MS-DOS console system (like the original Windows 3.1 GUI).


It was only ever used when programming for MS-DOS and pre-WindowsNT versions of Windows based off of MS-DOS (like Windows 3.1).


There is no conio module for OS X. Therefore you cannot install it.


I'm not even sure how, given your self-declaration as a newbie, you would have even run across the need to do a clrscr() call...are you trying to learn C from some old library book from the 90's? Usually people who run into this are trying to port old, old code to OS X, hardly a newbie sort of task.


Perhaps you could try explaining what you are trying to program; then people could provide more relevant advice.

Implicit declaration of function 'clrscr' is invalid in C99 ???

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.