From: Joe Mario <mario@zk3.dec.com>
To: jasperh <jasperh@debis.co.za>
Subject: Re: Memory fault(coredump) with time() function.
Date: 1999/01/20 [thread overview]
Message-ID: <36A5F6BF.167E@zk3.dec.com> (raw)
In-Reply-To: 01be4463$36d2fa80$64a305c4@jasper.somchem.denel.co.za
jasperh wrote:
>
> I get a Memory fault (coredump) when using the time() function in the
> following C code:
...
> int current_time;
> current_time=time();
> printf("now=%d\n", time());
The time function you are calling expects a parameter. The coredump
occurs because you didn't supply one. If you try compiling in
either of the ansi modes (-std or -std1), you'll see the compiler
give a compile time error about the missing argument.
Try "man 3 time".
Joe Mario
Compaq Digital UNIX
next prev parent reply other threads:[~1999-01-20 5:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-01-20 5:00 Memory fault(coredump) with time() function jasperh
1999-01-20 5:00 ` Joe Mario [this message]
1999-01-20 5:00 ` John Hascall
1999-01-25 5:00 ` Ajay Pal Singh
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox