Last active
August 9, 2018 14:21
-
-
Save Lazzlo2096/51f127fb0ada58131a1b072364b6f080 to your computer and use it in GitHub Desktop.
Hello boost
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.boost.org/doc/libs/1_66_0/more/getting_started/windows.html | |
//cl /EHsc /I path\to\boost_1_66_0 path\to\example.cpp | |
//g++ -I "C:\boost_1_66_0" ./main.cpp | |
//echo 1 2 3 | ./a.exe | |
//https://nuwen.net/mingw.html | |
//g++ -I "C:\MinGW\include" ./main.cpp | |
#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) << " " | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: all | |
all: main.cpp | |
g++ ./main.cpp | |
comment: | |
# http://www.mingw.org/wiki/includepathhowto #g++ -v -c ./main.cpp | |
# g++ -I "C:\MinGW\include" ./main.cpp | |
# or "C:\boost_1_66_0" | |
#make main from C:\MinGW\open_distro_window.bat | |
#MinGW from https://nuwen.net/mingw.html | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment