Gamestudio Links
Zorro Links
Newest Posts
Camera always moves upwards?
by NeoDumont. 02/17/26 15:40
Hedge on FXCM, 4 or 5?
by Martin_HH. 02/16/26 16:09
Zorro version 3.0 prerelease!
by jcl. 02/12/26 14:05
MarginCost discrepancy?
by jcl. 02/12/26 14:02
CMC MT4 CFD vs FX Active - what's better?
by mayarik. 02/11/26 11:00
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 9,583 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 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