Not in 1 step... but you can write a common routine to do it.
Simply write the number of entries ( get with size() ), then iterate through the map ( using begin() and end() ) and write the key/value pairs to the file.
and it seems to work, but I really don't know how I can retrieve my data in my binary file...because I can't do a "for" loop, cause I don't know how many entries I have...Could you help me?
About the first three elements it's not a problem I can do this :