I want to implement the following:
I define a function. And when I write N ()‘s after the function, the function will be called N times.
I give an example:
#include <iostream>
using namespace std;
typedef void* (*c)();
typedef c (*b)();
typedef b (*a)();
a aaa()
{
cout<<"Google"<<endl;
return (a)aaa;
}
int main()
{
aaa()()()();
system("pause");
}
Then the output is :

Are there any other methods to implement that?
It’s simple using functors.