Karthik Agarwal

Karthik Agarwal

  • NA
  • 748
  • 266.1k

How to use the string as a function as function call?

Jun 6 2012 6:39 AM
Hi,

I have a string which  i will be getting from the input from a user.
But i should take the input what user gives and obviously that is the name of a function in my code. So i should call the function which the user has entered. How can i do this?

Example: Suppose the user has entered a name "interpolation" in the textbox in the form and then he presses enter. Then i should read the name as follws:

String ^ function_call = textbox->Text;
and after this operation i should call the function interpolation which user has entered. 
int index = interpolation();//this is what i need this function will return a integer.

Answers (3)