Re: [Boost-users] store vector<> to filesystem (newbie question)
18 Apr
2007
18 Apr
'07
10:45 p.m.
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
6365
Age (days ago)
6365
Last active (days ago)
0 comments
1 participants
participants (1)
-
Gennady Khokhorin