Very Basic question
Very Basic question
- Subject: Very Basic question
- From: Lorenzo <email@hidden>
- Date: Wed, 17 Nov 2004 11:21:24 +0100
Hi,
I would like to initiate an array of floats with 2 dimensions like
float gPoints[8][totPoints];
But I would like to use "malloc" so I can use this variable as global in my
class, and use free(gPoints) when release the object.
Also, the variable totPoints changes all the time, so I really need to
delete and recreate gPoints all the time.
I already know how to create the array with one dimension only, with malloc.
float *gPointsX = malloc(sizeof(float) * totPoints);
So, how to do the same with a two dimensional array?
Sorry for the very basic question, but I forgot how to do it.
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden