Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- // lambda function
- auto fx = [](int a, int b) -> int {
- // do something
- };
- // ini fungsi yang dipanggil
- auto fungsi(int i) -> int (*)(int, int)
- {
- return fx;
- }
- int main() {
- fungsi(0)(1,2);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement