|
Boost Users : |
From: Gennady Khokhorin (gok_at_[hidden])
Date: 2007-04-18 18:45:12
>template<typename Archive>
>struct Serializer {
> static void save(const vector<double>& timeStamps) {
> std::ofstream ofs("file.bin", std::ios::binary);
>
> Archive oa(ofs);
> oa << timeStamps;
> }
>};
>
>Serializer<binary_oarchive>::save(timeStamps);
Thanks, Bill, for your fast respond!
Started reading serialization.
Did try to use serialization from your sample, got stuck with error message:
Error 20 error C2039: 'serialize' : is not a member of 'std::vector<_Ty>' c:\boost\include\boost-1_33_1\boost\serialization\access.hpp 109
Is it restriction sign for using std::vector<> with << operator or I'm missing some headers?
my settings:
#include <boost\archive\binary_oarchive.hpp>
using namespace boost::archive;
gok
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net