Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 13,353 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Use returned structs right away #274508
06/27/09 02:04
06/27/09 02:04
Joined: Jul 2004
Posts: 1,205
Greece
LarryLaffer Offline OP
Serious User
LarryLaffer  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,205
Greece
This would make my life a little bit easier..


typedef struct TEST {
var vVartest;
} TEST;


TEST* createStruct()
{
TEST* testPointer=malloc(sizeof(TEST));
testPointer->vVartest=5;

return (testPointer);
}

void main()
{
var vTemp=createStruct()->vVartest; //syntax error in this line
}



INTENSE AI: Use the Best AI around for your games!
Join our Forums now! | Get Intense Pathfinding 3 Free!
Re: Use returned structs right away [Re: LarryLaffer] #274539
06/27/09 07:36
06/27/09 07:36
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
var vTemp=(createStruct())->vVartest; works for me...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

Moderated by  aztec, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1