Hi,
I have started to use the Boost iostreams library in one of my projects. I am using the latest Boost version, 1.46.1 with a 64-bit Linux OS on a x86-64 architecture.
When I compile and run the small program below, "HeavyArtillery2.txt" is created, but "HeavyArtillery1.txt" is not, and I don't understand why. Am I missing something obvious?
#include <boost/iostreams/stream.hpp>
#include <boost/iostreams/device/file.hpp>
namespace io = boost::iostreams;
int main(int argc, char *argv[])
{
io::stream<io::file> out1;
out1.open("HeavyArtillery1.txt");
out1 << "Reach at that Arrogance which needs thy harm,\n"
"And beat it down before its sins grow worse.\n";
out1.close();
io::stream<io::file_sink> out2;
out2.open("HeavyArtillery2.txt");
out2 << "Reach at that Arrogance which needs thy harm,\n"
"And beat it down before its sins grow worse.\n";
out2.close();
}
--
Wim van der Meer