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)
Ι get this message when I use commands like clrscr(); system("pause"); etc...
any solutions
X-Code-OTHER, Mac OS X (10.7.3)
#include <stdlib.h>
Will get system() past the warning, I don't know for clrscr().
#include <stdlib.h>
Will get system() past the warning, I don't know for clrscr().
clrscr() is non-std C. It requires the non-standard conio.h
hello guys. Thanks much for the input.
Could u explain me how to install the externals stdlib and conio to X-Code ?
stdlib.h is part of the C standard libraries. You don't have to install it, just use it as xnav indicated.
conio.h was used by MS-DOS for supporting console I/O to text-based User Interfaces. Don't install it. Redesign your program to do I/O properly, possibly by using ncurses.
I am a really newbie so I can't understand what you are talking about in your 2nd paragraph.
So how can I install it?
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.
Thanks for your help m8.
I am attending a programming-development course and I learn C by now at the 2nd quarter of the course, so I try to checkout all the commands.
Thanks for the replies.
For C (or any of the variants) it is critical to include the correct include file such as stdlib.h or stdio.h. Your command reference should clearly spell out which includes are required.
If you are using a text by Schildt, I feel sorry for you, you will have to unlearn many things that are not standard C.
Implicit declaration of function 'clrscr' is invalid in C99 ???