C
CJ
Ok, I've got a string class that stores the data in a dynamically allocated
"char* m_pData" variable. I'd like to write a member function similiar to
"sprintf" for this class.
When implementing this member function, I'd like to just call "sprintf"
under the covers. The problem is, that I dont' know how large the resulting
string will be and thus I don't know how much space I'll need to allocate
for my m_pData pointer.
Is there any easy what to do this?
Thanks!
-CJ
"char* m_pData" variable. I'd like to write a member function similiar to
"sprintf" for this class.
When implementing this member function, I'd like to just call "sprintf"
under the covers. The problem is, that I dont' know how large the resulting
string will be and thus I don't know how much space I'll need to allocate
for my m_pData pointer.
Is there any easy what to do this?
Thanks!
-CJ