Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <423DC28A.8030408@familiehaase.de> Date: Sun, 20 Mar 2005 19:35:54 +0100 From: "Gerrit P. Haase" Organization: Esse keine toten Tiere User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7.3) Gecko/20040910 MIME-Version: 1.0 To: Alex Vinokur CC: cygwin AT cygwin DOT com, gcc-help AT gcc DOT gnu DOT org Subject: Re: g++ & rand() in Cygwin References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Alex Vinokur wrote: > ------ foo.cpp ------ > #include > #include > using namespace std; > int main () > { > cout << rand() << endl; > cout << rand() << endl; > return 0; > } > --------------------- > > > // g++ version 3.3.3 (cygwin special) > > $ g++ foo.cpp > > The program below generates the following output: > ----------- > 0 > 1481765933 > ----------- > > First pseuso-random number is 0. > > Is it by purpose? I don't know. I use MT for random number generation: http://anfaenger.de/cygwin/MersenneTwister/ Gerrit -- =^..^= Action Soccer: http://www.action-soccer.de/?lv=de&id=505 (german online game) -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/