Writing classes of dynamic size
Hello.
So first of all, I'm used to C, but not C++, so I probably need a little bit more explanation than is normal.
Here is my question:
Suppose I have a class like this
Code:
class Hello
{
public:
Hello() {};
~Hello() {};
char *str;
float x;
};
Furthermore, I have a program which, in the end, outputs a Hello object in direct binary form. I am wondering how this can be done considering that we do not know, a priori, how large the object will be.
Thanks for any help!