There is only one 'true' function, corresponding to the JMP in the Assembly, that is, jump to a specific address for execution.
Global functions, local functions, member functions, static member functions, and virtual functions are all delicious syntactic sugar.
Global functions are basically functions in the original sense.
Local functions (static global functions) only restrict the permission of local CPP in GCC.CodeJMP in the past. In fact, this concept does not exist at the assembly or binary level. Pure syntactic sugar.
The member function only adds the class-based prefix to the function by GCC, and then adds the this pointer parameter. In fact, after GCC compilation, it becomes a global function, but the function name is special. Pure syntactic sugar.
The static member function is the same as the member function, but the fixed parameter * This is missing. Pure syntactic sugar.
There are a lot of people familiar with virtual functions. I will not elaborate on it. It is also JMP in the end. It's just that JMP had to get the target address of JMP through computation. More complex syntactic sugar.