What type of C++ cast should be used to look at an entire struct, not just its first member?

前端 未结 0 1188
被撕碎了的回忆
被撕碎了的回忆 2020-12-08 04:11

X is defined as the following:

struct X
{
    Y y;
    // more fields...
    int a;
};

I have a pointer of type Y*,

相关标签:
回答
  • 消灭零回复
提交回复
热议问题