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
1 registered members (TipmyPip), 18,561 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
structs - initialization in functions? #135873
06/11/07 22:39
06/11/07 22:39
Joined: Jun 2006
Posts: 214
Germany, NRW
T
TheThinker Offline OP
Member
TheThinker  Offline OP
Member
T

Joined: Jun 2006
Posts: 214
Germany, NRW
Hi,
I want to know if i understand this struct thing.
First question:
I have defined a struct GRID.
So, I create a grid node:

function create_grid()
{
GRID* point;
static GRID temp;
point = start
}

I know that this cant be right, because the engine gives the error:
Can't convert struct to pointer.
Is there a way to create initialized structs in a function?
I want to create 360 Grid nodes. It is not much fun to create every node myself, so i want them generatedby a for loop.
MfG,
Patrick

Last edited by TheThinker; 06/11/07 22:40.
Re: structs - initialization in functions? [Re: TheThinker] #135874
06/12/07 03:30
06/12/07 03:30
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
point = &start;



julz


Formerly known as JulzMighty.
I made KarBOOM!

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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