#include #include #include #include void add(std::string& ziel, std::string quelle) { ziel += quelle; } int main() { auto woerter = { "super", "cali", "fragi", "listisch" }; std::string s; auto f = std::bind(add, std::ref(s), std::placeholders::_1); std::for_each(begin(woerter), end(woerter), f); std::cout << s << '\n'; }