Mail Archives: djgpp/1997/05/10/03:31:44
Ross Litscher wrote:
>
> Hi, I am kind of new to c++ and brand new to djgpp. I got about 98% of
> the following code off the internet. The problem is that I get a
> warning after I compile this. It is as follows:
>
> vidmode2.cpp(30) Warning: implicit declaration of function 'int
> rand(...)'
read the docs. find out that rand is declared in stdlib.h, include
stdlib.h. now, was that so hard?
> void main(void)
first, this is pure and simple C. in any case, void is not a valid
return type for main. main has to return an int. if you can't think of
values EXIT_SUCCESS and EXIT_FAILURE are good ones (also in stdlib.h.)
--
Sinan
*******************************************************************
A. Sinan Unur WWWWWW
|--O+O
mailto:sinan DOT unur AT cornell DOT edu C ^
http://www.people.cornell.edu/pages/asu1/ \ ~/
Unsolicited e-mail is _not_ welcome, and will be billed for.
*******************************************************************
- Raw text -