How do you determine the size of an object in C++?

前端 未结 11 990
轮回少年
轮回少年 2020-11-28 05:38

For example, say I have a class Temp:

class Temp
{
    public:
        int function1(int foo) { return 1; }
        void function2(int bar) { foobar = bar; }         


        
11条回答
  •  一向
    一向 (楼主)
    2020-11-28 06:25

    This may help.

    Additionally, class functions are represented just like any other function. The only magic that C++ does to the function is to mangle the function names to uniquely identify a specific function with a specific set of parameters inside a specific class.

提交回复
热议问题