| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | c++ help |
From: "Geo"
Ok, going nuts here. I'm trying to write a simple pick 3 lotto function.
Why doesn't this work?
void CLottoDlg::OnPlay3()
{
char s[5], a, b, c;
srand(time(NULL));
for (int i=1; i<=rand(); i++)
{
itoa((rand()%10),a,10);
itoa((rand()%10),b,10);
itoa((rand()%10),c,10);
s[0]=a;
s[1]='-';
s[2]=b;
s[3]='-';
s[4]=c;
m_pick3=s;
}
UpdateData(FALSE);
}
--- BBBS/NT v4.01 Flag-5
* Origin: Barktopia BBS Site http://HarborWebs.com:8081 (1:379/45)SEEN-BY: 633/267 270 5030/786 @PATH: 379/45 1 396/45 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.