rand()
- From: "Petar Popara" <my.fake@xxxxxxxx>
- Date: Mon, 4 Jul 2005 10:24:45 +0200
I have this peace of the code:
char tmp1[19], tmp2[19], tmp3[19];
itoa(rand(), tmp1, sizeof(tmp1));
itoa(rand(), tmp2, sizeof(tmp2));
itoa(rand(), tmp3, sizeof(tmp3));
The output is:
tmp1 = 23;
tmp2 = 2d2i;
tmp3 = ha7;
The output is allways the same. :( Also, I don't understand how conversion
from int into char[] can be "2d2i" or "ha7" ?!?
.
- Follow-Ups:
- Re: rand()
- From: Udo Huebner
- Re: rand()
- From: Bill Thompson
- Re: rand()
- Prev by Date: Re: Deleting Folder - RemoveDirectory()
- Next by Date: CFile::GetLength error in processing HUGE file.
- Previous by thread: CDateTime & miliseconds
- Next by thread: Re: rand()
- Index(es):
Relevant Pages
|
Loading