Article View: comp.os.ms-windows.programmer.tools.mfc
Article #154Re: REQ : How to make random number in MFC? MFC���� ���� ��?
From: Anders Alvs�ker
Date: Wed, 12 Aug 1998 00:00
Date: Wed, 12 Aug 1998 00:00
25 lines
2062 bytes
2062 bytes
Hi ! First set a random starting point : srand((unsigned) time(NULL)); Then generate a random number : int n1 = rand() % 10; n1 should be in the range 0 - 9 (specified by %10). Euntaek Woo wrote in message <5oG4ooYx9GA.223@news4.netsgo.com>... >How can I make 1-digit integer random number in MFC? >Unlike Borland C or C++, the function 'random' doesn't work. >How can I do? >Thanx. > >MFC���� ���� ������ ���Ű���� �ϴµ� C �� C++���� >ó�� random �Լ��� ����� �����Ͽ����� ��������. >��� �ؾ��ϴ��� �ƽô� ���� �� ������ �ֽø� �?�ڳ�. >�����մϴ�. > > >
Technical Details
Message-ID:
<#WIFovbx9GA.261@uppssnewspub04.moswest.msn.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<5oG4ooYx9GA.223@news4.netsgo.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f4d60,46edaee1b8420749 X-Google-Attributes: gidf4d60,public X-Google-Thread: 1138df,46edaee1b8420749 X-Google-Attributes: gid1138df,public X-Google-Thread: 104971,46edaee1b8420749 X-Google-Attributes: gid104971,public X-Google-Thread: f58d1,46edaee1b8420749 X-Google-Attributes: gidf58d1,public X-Google-Thread: f7a51,46edaee1b8420749 X-Google-Attributes: gidf7a51,public X-Google-Thread: 104d65,46edaee1b8420749 X-Google-Attributes: gid104d65,public X-Google-Thread: fffac,46edaee1b8420749 X-Google-Attributes: gidfffac,public X-Google-Thread: 10ef8f,46edaee1b8420749 X-Google-Attributes: gid10ef8f,public From: "Anders Alvs�ker" <anders@techsoft.no> Subject: Re: REQ : How to make random number in MFC? MFC���� ���� ��? Date: 1998/08/12 Message-ID: <#WIFovbx9GA.261@uppssnewspub04.moswest.msn.net> X-Deja-AN: 380317599 References: <5oG4ooYx9GA.223@news4.netsgo.com> Newsgroups: comp.os.ms-windows.programmer.tools.mfc,han.comp.lang.c,han.comp.lang.c++,han.comp.lang.misc,han.comp.os.ms-windows.programming.misc,microsoft.public.vc.language,microsoft.public.vc.mfc,microsoft.public.vc.mfc.docview,microsoft.public.vc.online_he X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4