Saturday, April 21, 2012

Functional pointer for beginner

This is how I started understanding concept of functional pointer in C++.
This helped me getting understanding of how methods are invoked which now helped me in implementation through System.Reflection in C#.

String^ CALL_FUNCTION() // sample function to invoke dynamically
       return "I write you read…";
void FuncMain(String^ (*pt2Func)())
       String^ i = pt2Func();
int main(array ^args) // Console application
    Console::WriteLine("Hello World");
    return 1;

Hello World
I write you read…

1 comment: