delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/01/31/23:31:13

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: mitran AT fas DOT harvard DOT edu (Patrick Mitran)
Newsgroups: comp.os.msdos.djgpp
Subject: bug with time(NULL) and rhide?
Date: 31 Jan 2004 20:22:29 -0800
Organization: http://groups.google.com
Lines: 26
Message-ID: <3737dcaf.0401312022.10576f5f@posting.google.com>
NNTP-Posting-Host: 65.96.174.89
X-Trace: posting.google.com 1075609349 24499 127.0.0.1 (1 Feb 2004 04:22:29 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Sun, 1 Feb 2004 04:22:29 +0000 (UTC)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi,

the following program always produces the same output when I run it from
rhide, but when I run it from cmd, produces different outputs

#include <time.h>
#include <iostream>

int main(char** argc, int argv)
{
 std::cout << time(NULL) << std::endl;
 return 0;
}

For example, from rhide, unless I exit rhide and restart, everytime
I press ctrl-F9, I get (under WinXP for a particular run),

1075591010

From the cmd.exe prompt, the number increments every second as
expected.

Is this normal, or is it a bug? I am using gcc 3.2.3, rhide 1.5.0.1.

Thanks,
Patrick

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019