![]() |
|
#1
|
|||
|
|||
Writing a map into fileMaybe somebody could please help me understand why I fail to write stl's map of vectors into a file using CFile::Write()?
CPP / C++ / C Code:
CPP / C++ / C Code:
When I am writing, the m_mapLocations contains valid data. But when I read from file, it is empty, though the iSize is correct... CPP / C++ / C Code:
Last edited by LuciWiz : 16-Sep-2009 at 13:31.
Reason: Please insert your C++ code between [cpp] & [/cpp] tags
|
|||
|
#2
|
|||
|
|||
Re: Writing a map into fileQuote:
It's probably the size of a couple of pointers, and the pointers point to "some place" in memory where the actual elements values are stored. You will have to access and store all of the elements individually to be able to save them in a file (they are not necessarily in contiguous memory as far as I can tell). Regards, Dave |
|
#3
|
|||
|
|||
Re: Writing a map into fileThank you Dave. This is what I suspected, too. I will store all elements separately, as you say.
|
Recent GIDBlog
Once again, no time for hobbies by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Airport Log program using 3D linked List : problem reading from file | batrsau | C Programming Language | 11 | 29-Feb-2008 08:44 |
| After execution - Error cannot locate /Skin File? | WSCH | C++ Forum | 1 | 05-Mar-2005 21:03 |
| CD burner wont burn!! | robertli55 | Computer Hardware Forum | 1 | 18-Jun-2004 11:53 |
| Yet another CD burner problem: Lite-On LSC-24082K | Erwin | Computer Hardware Forum | 1 | 22-May-2004 12:28 |
| CD Buring Failed | skanth2000 | Computer Hardware Forum | 1 | 15-Nov-2003 04:52 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The