#include <iostream>
#include <vector>
#include <functional>
#include <algorithm>

struct MyClass {
	void fun(int b, int c) const {
		std::cout << a << " " << b << " " << c << std::endl;
	}
	MyClass(int _a) : a(_a) {}
private:
    int a;
};

int main() {
	std::vector<MyClass> v {10, 20, 30};
	std::for_each(v.begin(), v.end(), [](const MyClass& m) { m.fun(3, 7); });
	return 0;
}