Does Winv2 have string returns?
Displaying 1-6 of 6 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Omni

Please add them!



Posted on 2002-02-02 17:04:40

rpgking

I have a few string returns in my code, and it works fine. So I'm guessing it's already in there ;)



Out of clutter, find simplicity. -Einstein

Posted on 2002-02-02 17:33:51

Omni

Code:

string tempstring;
return tempstring;
}

vcc:

VCC: Return: ; expected, got tempstring



Posted on 2002-02-02 17:50:45

NeWX

void func()
{
string tstring;
return tstring;
}

VCC is expecting ';' because on void functions,
'return;' is used to 'end' the function.
like this:
void func()
{
if(!player_dead)
return;
else
GameOverEffect();
}

Did you understand? Okay.
Now, to return strings, you should do this:

string func()
{
string tstring;
tstring="bweee";
return tstring;
}

Done.



Posted on 2002-02-03 06:16:49

NeWX





Posted on 2002-02-03 06:18:54

Omni





Posted on 2002-02-03 07:40:05


Displaying 1-6 of 6 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.