What is the C++ memory layout of objects/structs etc?

前端 未结 2 702
小鲜肉
小鲜肉 2021-01-20 21:10

In C++ I presume the C++ standard has nothing to do with how data members are arranged within a class, in terms of memory layout? Would I be right in thinking this is down t

2条回答
  •  情书的邮戳
    2021-01-20 21:44

    Yes, the standard doesn't say how the objects are to be represented in memory. To get an idea how normall C++ objects are represented read this book: inside C++ object model.

提交回复
热议问题