问题(Question):
各位板上大大请问一下:
1. 程式输出得到 sizeof 为 1, 怎么解释?(Class 连同 align space 共计 1 byte?)
2. &Slot::inner_var 明明在第二位置,为何输出为 member = 1 ?
谢谢各位!
下列程式执行得到:
size of A = 1
&slot = 0x7fff5140c9f8
member = 1
slot.*member = 0x10e7f50bc
a.get_program() = 0x10e7f50bc
程式码(Code):(请善用置底文网页, 记得排版)
https://goo.gl/gezaKC