How can I call a function, given its name as a string?

Answer Posted / hemant ware

A function can be called by object name and a function
name (sring ) with dot(.) operator.
e.g
class hi
{
void string()
{
cout<<"hello I am in string function";
}
};
void main()
{
hi h1;
h1.string();
}

Is This Answer Correct ?    12 Yes 46 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is sizeof a keyword in c?

555


What is difference between function overloading and operator overloading?

629


What is the use of pragma in embedded c?

569


Why we use stdio h in c?

549


What is the role of && operator in a program code?

547






What are multibyte characters?

621


How can I change their mode to binary?

668


Who developed c language?

613


What is c standard library?

665


Write a program to reverse a string.

614


What is meant by errors and debugging?

626


What are pointers? Why are they used?

602


general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only

559


What is a program flowchart?

582


how can I convert a string to a number?

569