|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: Dynamic arrays
>char *ptrArray = NULL; > >// for c++, use new to dynamically allocate at run-time a char array of 10 >elements >ptrArray = new char[10]; > >// for C, use malloc() to allocate at runtime a char array of 10 elements >ptrArray = (char*) malloc(sizeof(char)*10); > >also remember to clean up the dynamically allocated memory using delete >(c++), or free (c). How would you do multi-dimensional arrays for C and C++? Thanks guys, SirFern ================================================================= The GameProgrammer.Com mailing list is for the open discussion of any topic related to the art, science, and business of programming games. This list is especially tolerant of beginners. We were all beginners once To SUBSCRIBE or UNSUBSCRIBE please visit: http://gameprogrammer.com/mailinglist.html
|
|