[FIXED] boost simple program problem
I have this small boost program ...
Code:
#include <boost/lambda/lambda.hpp>
#include <iostream>
#include <iterator>
#include <algorithm>
int main()
{
// using namespace boost::lambda;
// typedef std::istream_iterator<int> in;
std::for_each(
std::istream_iterator<int> in(std::cin),
in(),
std::cout << (boost::lambda::_1 * 3) << " "
);
return 0;
}
and when compiling under MSVC .Net 2003, it gives following errors:
Quote:
Compiling...
test-bed.cpp
c:\my\src\cpp\test-bed\test-bed.cpp(267) : error C2275: 'std::istream_iterator<_Ty>' : illegal use of this type as an expression
with
[
_Ty=int
]
c:\my\src\cpp\test-bed\test-bed.cpp(267) : error C2146: syntax error : missing ')' before identifier 'in'
c:\my\src\cpp\test-bed\test-bed.cpp(269) : error C2059: syntax error : ')'
Can someone explain this?