This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to use time() in g++ for random number generator seed?


On 27 July 2011 05:02, eric <fsshl@att.net> wrote:
> 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
>

G++ is correct.

http://gcc.gnu.org/onlinedocs/libstdc++/manual/strings.html

Now go away, you irritating fool.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]