n4gix
Resource contributor
- Messages
- 11,674
- Country

That is precisely correct. You might note that I've used the symbol # as a flag to indicate that the number following is the number of elements I need in the dynamic array. I've found that some characters do not work well as custom flags (such as the ! character). 

Code:
if (iInit == 0 && pgauge && pgauge->parameters)
{
ZeroMemory( scratch, MAX_PATH*sizeof(char) );
strcpy_s(scratch, MAX_PATH, pgauge->parameters);
comma = strrchr(scratch,'#'); // file path separate from number of sounds by the last # in the string
if (NULL == comma) //comma not found, use default number of sounds
{
iMaxSounds = MAX_SOUNDS;
}
else
{
*comma = 0;
iMaxSounds = atoi(comma+1);
if (iMaxSounds <=0 || iMaxSounds > 1000 ) iMaxSounds = MAX_SOUNDS; //check for reasonable limits on number of sounds
}
// stripped for brevity
iInit = 1;
}
Last edited:




I hated it probably as much as I hate VI...

