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,388 guests, and 6 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
somewhat n00bish question... #215856
07/13/08 18:08
07/13/08 18:08
Joined: Aug 2005
Posts: 238
Caermundh Offline OP
Member
Caermundh  Offline OP
Member

Joined: Aug 2005
Posts: 238
So I have just started in on a new project and have made the move to A7 from A6. First thing i notice about the new language is that I can use structs!!! YAAAAAAA!!!!

My question is, after declaring a struct such as:

typdef struct
{ string* name[50];
string* desc[500];
int x;
int y;
} my_struct

Is there a way to dynamically allocate instances of this struct during runtime? Is there some c-lite equivalent of the Ansi-C malloc() function?

Re: somewhat n00bish question... [Re: Caermundh] #216068
07/14/08 23:08
07/14/08 23:08
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline
User
MrCode  Offline
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
yes, you can malloc(sizeof(my_struct)). At least, that's what I did.


Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Re: somewhat n00bish question... [Re: MrCode] #216073
07/14/08 23:32
07/14/08 23:32
Joined: Aug 2005
Posts: 238
Caermundh Offline OP
Member
Caermundh  Offline OP
Member

Joined: Aug 2005
Posts: 238
i can just use malloc()?!? LOL. Thanks ;D

I wonder how much C you can get away with in lite-c?

Re: somewhat n00bish question... [Re: Caermundh] #216080
07/15/08 00:49
07/15/08 00:49
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
Look in the beta and forecast what can and can not yet be done wink


Click and join the 3dgs irc community!
Room: #3dgs

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