Newbie needs yet more help with serialization - BOOST_SERIALIZATION_SPLIT_FREE

Hi all, I don't understand why the following code doesn't compile. It gives an strange error: "missing type specifier - int assumed. Note: C++ does not support default-int" Any ideas? --Hector C. #define tpath boost::filesystem::wpath template< class Archive > void save( Archive & x_Stream, const tpath & x_Path, const unsigned int a_Version ) {} BOOST_SERIALIZATION_SPLIT_FREE(tpath) BOOST_CLASS_TRACKING(tpath, boost::serialization::track_never) int wmain(int argc, tchar * argv[]) { tpath tt; std::ofstream off(_T("test.txt"), std::ios_base::binary); boost::archive::binary_oarchive oa((std::ostream &)off); oa << tt; return 0; } ____________________________________________________________________________________ Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/

I don't see any serialization code for tpath. RObert Ramey Hector C. wrote:
Hi all,
I don't understand why the following code doesn't compile. It gives an strange error: "missing type specifier - int assumed. Note: C++ does not support default-int"
Any ideas?
--Hector C.
#define tpath boost::filesystem::wpath
template< class Archive > void save( Archive & x_Stream, const tpath & x_Path, const unsigned int a_Version ) {}
BOOST_SERIALIZATION_SPLIT_FREE(tpath) BOOST_CLASS_TRACKING(tpath, boost::serialization::track_never)
int wmain(int argc, tchar * argv[]) { tpath tt; std::ofstream off(_T("test.txt"), std::ios_base::binary); boost::archive::binary_oarchive oa((std::ostream &)off);
oa << tt;
return 0; }
____________________________________________________________________________________ Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/
participants (2)
-
Hector C.
-
Robert Ramey