ul********@gmail.com wrote:
I have a std::map instance that I want to save into harddisk so that I
donot have to recompute it each time. The map itself is keyed by a
string and the values are pointers to other objects. Is it possible
the whole data structure so that it can be loaded later?
Not really (or perhaps I don't understand the question). Pointers are
meaningless outside of the current running process, so saving their
values to file would not help. Saving objects behind those pointer
would be better, of course, but then you'd be duplicating them. Maybe
you could rethink your approach or have some kind of permanent "handle"
(number, ID, whatever) assigned to every object (uniquely of course)
and then save those along with the strings...
I don't see a C++ language problem here, though.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask