I have the following code:
#include <utility>
#include <vector>
#include <string>
#include <fstream>
#include <iostream>
#include <map>
#include
#include
#include
#include
#include
#include
using namespace std;
void print(multimap, int> &m)
{
multimap, int>::iterator it1 = m.begin();
multimap, int>::iterator it2 = m.end();
for(; it1!=it2; ++it1)
{
cout<<"key = "<<(it1->first).first<<(it1->first).second<<"\t\t";
cout<<"value = "<<(it1->second)<, int> m1;
pair par1("A", "B");
pair par2("A", "B");
pair par3("E", "F");
pair par4("E", "F");
m1.insert(pair, int>(par1,10));
m1.insert(pair, int>(par2,20));
m1.insert(pair, int>(par3,30));
m1.insert(pair, int>(par4,40));
ofstream ofs("filename");
boost::archive::text_oarchive serial1(ofs);
serial1 << m1;
ofs.close();
ifstream ifs("filename");
boost::archive::text_iarchive serial2(ifs);
multimap, int> m2;
serial2 >> m2;
cout<<"map1 = "<
that I don't know what it means.
Is this a normal behavior of the serialization library?
I am missing something ?