This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
G++/times causes access violation on cygwin, not linux
- To: "cygwin forum" <cygwin at sources dot redhat dot com>
- Subject: G++/times causes access violation on cygwin, not linux
- From: "Mirko Vukovic" <mvukovic at my-Deja dot com>
- Date: Thu, 24 Aug 2000 08:43:53 -0700
- Organization: My Deja Email (http://www.my-deja.com:80)
- Reply-To: mvukovic at my-Deja dot com
The code that follows in the included message compiles cleanly under both cygwin (egcs 2.91.57) and linux (egcs 2.91.66), but runs only under linux.
Passing a proper variable to times() instead of NULL (pointer to a "tms" structure), does not improve things.
I still bet it is not a bug, but what is the problem then?
Mirko
>
> When the following code
>
> # include <sys/times.h>
> # include <iostream.h>
> int main()
> {
> clock_t ElapsedSystemTime;
> ElapsedSystemTime=times(NULL);
> cout << ElapsedSystemTime <<"/n";
> return 0;
> }
>
> is run, I get an access violation. I adapted this from Tom Swan's (sp?)
> G++ on Linux book.
--== Sent via Deja.com http://www.deja.com/ ==--
Before you buy.
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com