G
Grey Alien
My C is a bit rusty, after spending several years in the C++ garden. I
want to write a func like :
long AllocStruts(MyStruct s1, ...)
{
long ret = -1 ;
/*allocate memory for all structs passed in*/
/* If an allocation fails, free all previously allocated memory and
return error */
return ret ; /* 0 == success, else eror
}
How may I implement such a func?.
want to write a func like :
long AllocStruts(MyStruct s1, ...)
{
long ret = -1 ;
/*allocate memory for all structs passed in*/
/* If an allocation fails, free all previously allocated memory and
return error */
return ret ; /* 0 == success, else eror
}
How may I implement such a func?.