How does sizeof work? How can I write my own?

后端 未结 10 2341
粉色の甜心
粉色の甜心 2021-02-08 07:29

I know C++ and know the function sizeof itself but I need to write my own sizeof function so please explain how it works exactly? What does it do with the parameter

10条回答
  •  别跟我提以往
    2021-02-08 08:24

    If he wants to write his own sizeof he just needs to grab the source code of a C++ compiler and go ahead. The source will also show how sizeof can be implemented.

提交回复
热议问题