how to use time() in g++ for random number generator seed?
Jonathan Wakely
jwakely.gcc@gmail.com
Tue Jul 26 04:24:00 GMT 2011
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.
More information about the Libstdc++
mailing list