Untitled
unknown
plain_text
2 years ago
271 B
6
Indexable
#include <iostream>
using namespace std;
template<typename T>
int Plus (const int a, T fp)
{
return fp(a);
}
int main ()
{
auto plus_one = [value=1] (const int x) -> int
{
return x + value;
};
int res = Plus (5, plus_one);
cout << res << endl;
return 0;
}Editor is loading...
Leave a Comment