Click here to Skip to main content
15,910,009 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalquestion Pin
1-May-02 14:48
suss1-May-02 14:48 
GeneralRe: question Pin
Nish Nishant1-May-02 14:52
sitebuilderNish Nishant1-May-02 14:52 
GeneralRand() Pin
SilverShalkin1-May-02 13:27
SilverShalkin1-May-02 13:27 
GeneralRe: Rand() Pin
Nish Nishant1-May-02 13:35
sitebuilderNish Nishant1-May-02 13:35 
GeneralRe: Rand() Pin
SilverShalkin1-May-02 14:00
SilverShalkin1-May-02 14:00 
GeneralRe: Rand() Pin
Nish Nishant1-May-02 14:05
sitebuilderNish Nishant1-May-02 14:05 
Generalcall me stupid... BUT :) Pin
SilverShalkin1-May-02 14:29
SilverShalkin1-May-02 14:29 
GeneralRe: call me stupid... BUT :) Pin
Nish Nishant1-May-02 14:51
sitebuilderNish Nishant1-May-02 14:51 
#include "stdafx.h"
#include <stdlib.h>
#include <time.h>

int _tmain(int argc, _TCHAR* argv[])
{
	srand((unsigned)time(NULL));
	for(int i=0;i<10;i++)
		printf("%d\n",rand()%10);
	return 0;
}


My output :-

D:\Projects\test\Debug>test.exe
6
5
2
0
8
0
3
1
5
0



Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.

GeneralMicrosoft Agent Pin
1-May-02 13:11
suss1-May-02 13:11 
GeneralRe: Microsoft Agent Pin
Michael P Butler1-May-02 22:39
Michael P Butler1-May-02 22:39 
QuestionExe Exporting Functions? Pin
1-May-02 12:40
suss1-May-02 12:40 
AnswerRe: Exe Exporting Functions? Pin
Nish Nishant1-May-02 12:46
sitebuilderNish Nishant1-May-02 12:46 
AnswerRe: Exe Exporting Functions? Pin
Mike Nordell1-May-02 13:29
Mike Nordell1-May-02 13:29 
Generalignore function Pin
Steve L.1-May-02 12:22
Steve L.1-May-02 12:22 
GeneralRe: ignore function Pin
Christian Graus1-May-02 13:01
protectorChristian Graus1-May-02 13:01 
GeneralRe: ignore function Pin
Mike Nordell1-May-02 13:20
Mike Nordell1-May-02 13:20 
Generalhelp with a dialog based application Pin
atomicluis1-May-02 11:50
atomicluis1-May-02 11:50 
GeneralRe: help with a dialog based application Pin
Ravi Bhavnani1-May-02 12:07
professionalRavi Bhavnani1-May-02 12:07 
GeneralRe: help with a dialog based application Pin
Nish Nishant1-May-02 12:08
sitebuilderNish Nishant1-May-02 12:08 
GeneralRe: help with a dialog based application Pin
Chris Losinger1-May-02 12:09
professionalChris Losinger1-May-02 12:09 
GeneralDynamic combo boxes Pin
1-May-02 10:51
suss1-May-02 10:51 
GeneralRe: Dynamic combo boxes Pin
Shog91-May-02 12:23
sitebuilderShog91-May-02 12:23 
GeneralRe: Dynamic combo boxes Pin
1-May-02 13:51
suss1-May-02 13:51 
GeneralSending Mouse Events to Window Pin
vins1-May-02 9:56
vins1-May-02 9:56 
GeneralRe: Sending Mouse Events to Window Pin
Jeremy Falcon1-May-02 10:03
professionalJeremy Falcon1-May-02 10:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.