I know odd title, but I've been working on something lately and I'm a little
confused at how to go about this, (bare with me, most of my c++ knowledge is
self taught.)

I'm trying to make my objects, objects. And have them much more object
oriented then they are currently. The problem I ran into tho is fread_obj,
now I  had altered it to return an int for the nest value, for those
functions that need to know how it's nested. But I have other things that
need to read objects as well. And rather then making a new function for
every type of object loading. I wanted to make fread_obj work solely as a
object reading function.

Now it didn't work well as a macro in the object_data cause it didn't like
the this = create_obj() stuff. And when I tried to be a smart ass and send
it a pointer to the object basically obj->fread_obj(fp, obj) ya well I
should have seen that coming.

My question is this, how could I go about loading the objects. In a nice
clean non hackish way? Is their a way to have an object read itself in from
a file?


Reply via email to