This is the mail archive of the
cygwin
mailing list for the Cygwin project.
rand() was not declared in this scope, please help‏
- From: "eric lin" <ericlin at fsshl dot zzn dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 8 Sep 2010 10:35:54 -0700
- Subject: rand() was not declared in this scope, please help‏
dear cygwin/gcc users:
I compile a simple code which i copied from a book, "The Complete Reference of C++" Fourth Edition by Herbert Schildt in page 575, rand()
which is clearly not be included in
#include <iostream>
I tried
#inlcude <cmath>
it still not compile, i.e. same compile error
please help(see which lib I should include)
/* I tried in ubuntu linux on my laptop, it also not compile by same reason */
Eric
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple