C++结构体内的成员在内存的物理地址是连续的吗?
来源:百度知道 编辑:UC知道 时间:2024/05/30 03:27:42
同上。
#include <stdio.h>
#include <string.h>
struct Test
{
int i,j,k;
char m,n;
};
void main()
{
Test t;
}
是连续的,我调试了下,结果很明显,有截图。
UC知道是一部内容开放、自由的互动网络百科全书
客观、专业、权威的知识性百科全书
来源:百度知道 编辑:UC知道 时间:2024/05/30 03:27:42
#include <stdio.h>
#include <string.h>
struct Test
{
int i,j,k;
char m,n;
};
void main()
{
Test t;
}
是连续的,我调试了下,结果很明显,有截图。