c++ method name

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

// SYNTAX
// __FUNCTION__
Source

Also in C++: