This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: how to use time() in g++ for random number generator seed?
- From: eric <fsshl at att dot net>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 26 Jul 2011 21:02:34 -0700
- Subject: Re: how to use time() in g++ for random number generator seed?
- References: <1311295479.3791.6.camel@eric-laptop> <cone.1311306633.707369.12398.500@monster.email-scan.com> <CAH6eHdS58xtzkOfx2iNi4FnVZWhhf627k_k=6Nx+4x0VNXyaKA@mail.gmail.com>
- Reply-to: fsshl at att dot net
On Tue, 2011-07-26 at 00:18 +0100, Jonathan Wakely wrote:
> On 22 July 2011 04:50, Sam Varshavchik <mrsam@courier-mta.com> wrote:
> > eric writes:
> >
> >> But, my g++ complain
> >> --------
> >> eric@eric-laptop:~/cppcookbook/ch11$ g++ Example11-11.cpp
> >> Example11-11.cpp: In function âint main()â:
> >> Example11-11.cpp:14:41: error: too few arguments to function âtime_t
> >> time(time_t*)â
> >> /usr/include/time.h:186:15: note: declared here
> >> ------------
> >> Need your help to fix it and thanks a lot in advance, Eric
> >
> > The error message seems to be self-explanatory to me. If you're unsure,
> > consult the man page for time(2).
> >
>
> Also, the libstdc++ mailing list is not for asking basic questions
> about how to call functions in the C standard library. Stop wasting
> people's time by abusing the gcc mailing lists.
-----------------------------------------------------------
Please follow the link and read the final comment of other c++ program
s comment of g++
http://groups.google.com/group/comp.lang.c
++/browse_thread/thread/1a882052fdc240fa/5eed4699d7141d5e?lnk=gst&q=%3A%
3Atoupper%2C+eric#5eed4699d7141d5e