Google News
logo
CPP - Interview Questions
What is Name Mangling in C++?
C++ compiler encodes the parameter types with function/method into a unique name. This process is called name mangling. The inverse process is called as demangling.
 
Example :
 
A::b(int, long) const is mangled as b__C3Ail’.
For a constructor, the method name is left out.
That is A:: A(int, long) const is mangled as C3Ail’.
Advertisement