Hai
I want to use structure in my program to read binary file
typedef struct {
qint16 emptyData;
qint32 runno;
} CommonData;
CommonData CD;
dataStm>>CD; // dataStm-> QDATASTREAM , code not working....
succession please..
suresh R
India
Hai
I want to use structure in my program to read binary file
typedef struct {
qint16 emptyData;
qint32 runno;
} CommonData;
CommonData CD;
dataStm>>CD; // dataStm-> QDATASTREAM , code not working....
succession please..
suresh R
India
you have to overload operator<<() and operator>>() for your struct
thanks
I want detailed code please
umulingu (25th July 2009)
thanks for ur suggestion
I will try ..............
Take any book for c++, there will be a lot of examples how to overload a operator. For debug and struct useThe text stream works equal. And the place for the deklaration/definition you will find...Qt Code:
friend QDebug operator<<(QDebug out, const YourStruct &s) { //... }To copy to clipboard, switch view to plain text mode
Bookmarks