Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (M_D), 1,430 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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 | chip programmers | 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