Gamestudio Links
Zorro Links
Newest Posts
Lapsa's very own thread
by Lapsa. 06/08/26 22:41
Stooq now requires an API key
by VHX. 06/08/26 20:14
ZorroGPT
by TipmyPip. 06/06/26 12:36
Zorro 3.01 recoded MMI function issue
by TipmyPip. 06/04/26 05:44
SGT_FW
by Aku_Aku. 05/31/26 11:05
Issues resuming trades on Demo account
by Martin_HH. 05/22/26 13:31
XTB
by pr0logic. 05/18/26 12:27
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (TipmyPip), 3,586 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Seraphinang, Koti, curry, DeepxKalsi, Samed
19219 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