Boost logo

Boost Users :

From: Hector C. (hhcalderon_at_[hidden])
Date: 2007-08-18 03:05:22


Hi all,

Can anyone give any ideas why uncommenting the #define
will give me errors?

--Hector C.

//#define GiveMeErrors
#include <fstream>

#ifdef GiveMeErrors
# include <boost/archive/binary_woarchive.hpp>
#else
# include <boost/archive/binary_oarchive.hpp>
#endif

int main(int argc, char * argv[])
{
#ifdef GiveMeErrors
    std::wofstream off("test.txt",
std::ios_base::binary);
    boost::archive::binary_woarchive oa((std::wostream
&)off);
#else
    std::ofstream off("test.txt", std::ios::binary);
    boost::archive::binary_oarchive oa((std::ostream
&)off);
#endif
    return 0;
}

----------------------------------

       
____________________________________________________________________________________
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more.
http://mobile.yahoo.com/go?refer=1GNXIC


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