Denarius
1st April 2009, 11:34
hey,
I was wondering how I could serialize a c++ string into a QDatastream
something like this:
string myString = "hello";
someStruct.myString = myString;
serialize via operator:
QDataStream& operator<< (QDataStream& out, const someStruct)
{
out << someStruct.myString;
How do I serialize the string in the QDataStream.
Obviously the above doesn't work.
I need this for something but the Qt reference isn't helping me.
Does anyone know how to do this?
I was wondering how I could serialize a c++ string into a QDatastream
something like this:
string myString = "hello";
someStruct.myString = myString;
serialize via operator:
QDataStream& operator<< (QDataStream& out, const someStruct)
{
out << someStruct.myString;
How do I serialize the string in the QDataStream.
Obviously the above doesn't work.
I need this for something but the Qt reference isn't helping me.
Does anyone know how to do this?