Instead of reading a file into a structure have the object read allocate memory for the object and return a pointer to it. Then have the caller verify it is the correct type of object.
Log in to post a comment.