Hi there, sorry to bother the community with my phoenix problems
today. Please consider the following code sample:
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include <algorithm>
#include <iostream>
#include <fstream>
#include <vector>
int _tmain(int argc, _TCHAR* argv[])
{
using namespace std;
using namespace boost::phoenix;
using namespace boost::phoenix::arg_names;
vector< int > ints;
ofstream out( ".\\remove.txt" );
// works
std::for_each( ints.begin(), ints.end(), cout << arg1 << " " );
// doesn't work - error C2297: '<<' : illegal, right operand has
type 'const char *'
std::for_each( ints.begin(), ints.end(), out << arg1 << " " );
return 0;
}
I couldn't find anything inside the documentation regarding file streams.
Thanks,
Christian