Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > The Zelaron Nexus > Science and Art > Tech Help

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next

 
Reply
Posted 2004-01-04, 11:47 AM in reply to Randuin's post "C++ Randomity Help"
EDIT:: This is Acer Posting, I didnt relize MarkiX logged on this computer

Chruser said:
Give the int functions return values, or change the function type to void.
yes this function has no return...

int statGen(int stat)
{
srand ( (unsigned)time( NULL ) );
stat = rand();
}

you are also can assign a value to stat, you cant unless its a *pointer]

so you could do this...

void statGen(int* stat)
{
srand ( (unsigned)time(NULL) );
stat = rand();
}


that should be right... dont have VC++ to test sorry
Old
Profile PM WWW Search
MarkiX is neither ape nor machine; has so far settled for the in-betweenMarkiX is neither ape nor machine; has so far settled for the in-between
 
 
MarkiX
 



 

Bookmarks

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules [Forum Rules]
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 09:19 PM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.