在下面的序列化和反序列化中,反序列化程序在下面提到的行终止。
const char *file = "aaa.bin";
std::ofstream outputstring(file,ifstream::binary);
boost::archive::binary_oarchive oa(outputstring,boost::archive::no_header);
int i =1;
oa<< i;
outputstring.close();
std::ifstream intputstring(file,ifstream::binary);
**boost::archive::binary_iarchive ia(intputstring);** //Program is terminating here
int j;
ia >> j;
intputstring.close();