I’m trying to serialize objects to send over network through a socket using only STL. I’m not finding a way to keep objects’ structure to be deserialized in the other host. I tried converting to string, to char* and I’ve spent a long time searching for tutorials on the internet and until now I have found nothing.
Is there a way to do it only with STL?
Are there any good tutorials?
I am almost trying boost, but if there is how to do it with STL I’d like to learn.
I got it!
I used strinstream to serialize objects and I sent it as a message using the stringstream’s method str() and so string’s c_str().
Look.
I’m not sure if is necessary convert to string before to serialize (ss << o), maybe is possible directly from char.