|
|
Ramesh wrote on Tuesday, May 04, 2010 11:40 AM:
> But in tree hierarchy, I need the key value pairs.. I need to know
> which one is parent and child..
You want to learn about "marshalling/unmarshalling" (aka "serialisation") of
data. Read and study a good book about data structures or start here:
http://en.wikipedia.org/wiki/Serialization. This is a very generic and basic
concept in computer science and has nothing to do with Qt. Qt /does/ provide
you the means of implementing that however (such as the mentioned QDataStream,
for instance, which takes care of the endianess problem).
This should give you the solution, too:
http://stackoverflow.com/questions/337868/want-to-save-binary-tree-to-disk-for-20-questions-game
Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
_______________________________________________
Qt-interest mailing list
Qt-interest@xxxxxxxxxxxxx
http://lists.trolltech.com/mailman/listinfo/qt-interest
|
|