2015-03-24 02:54 PM - last edited on 2023-08-01 01:28 PM by Doreena Deng
for (GS::Array<API_Guid>::ConstIterator it = elements.Enumerate (); it != NULL; ++it) { BNZeroMemory (&element, sizeof (API_Element)); element.header.guid = *it;
API_Guid *arrayGuid arrayGuid=*it;
2015-03-26 09:51 AM
// allocate memory for the array: API_Guid** arrayGuid = (API_Guid**) BMAllocateHandle (elements.GetSize () * sizeof (API_Guid), ALLOCATE_CLEAR, 0); // using the array: (*arrayGuid) = (*it); // when finished the work with the array don't forget to free the memory: BMKillHandle ((GSHandle *) &arrayGuid);Or if you don't want to bother with memory handling, then you should use GS::Array for this purpose:
GS::Array<API_Guid> arrayGuid; arrayGuid.Push (*it); // or insert it to a specific index: arrayGuid.Insert (i, *it); // you can get the pointer to the array content also: API_Guid* arrayGuidPointer = arrayGuid.GetContent (); arrayGuidPointer = (*it);