@jc
多謝指點(diǎn),不過對(duì)于bjam的install 命令不是很了解,還請(qǐng)?jiān)斦f
@sunoom
就象樓上說的那個(gè)格式,這是在網(wǎng)上找到的代碼:
#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(
in(std::cin), in(), std::cout << (_1 * 3) << " " );
}
運(yùn)行后輸入1 2 3 結(jié)果為3 6 9