Check out example codes for "c++ method name". It will help you in understanding the concepts better.

Code Example 1

// EXAMPLE: if you are in a function/method called YourMethod()
std::cout << "Current function: " << __FUNCTION__; // OUTPUT: Current function: YourMethod

// SYNTAX
// __FUNCTION__

Learn ReactJs, React Native from akashmittal.com