嵌套结构中的Memcpy
我有两个嵌套结构嵌套结构中的Memcpy,c,structure,memcpy,C,Structure,Memcpy,我有两个嵌套结构 struct OS_CLASS { PAGE route_table[10]; }*sptr_vrf; struct PAGE{ int routes; } struct G-info{ PAGE *displ_table; } *global_info 我需要将sptr\u vrf->route\u table[0]复制到global\u info->Display\u table 如何使用memcpy来实现它?memcpy(全局信息->显示表,&
struct OS_CLASS {
PAGE route_table[10];
}*sptr_vrf;
struct PAGE{
int routes;
}
struct G-info{
PAGE *displ_table;
} *global_info
我需要将sptr\u vrf->route\u table[0]复制到global\u info->Display\u table
如何使用memcpy来实现它?
memcpy(全局信息->显示表,&sptr\u vrf->路由表[0],大小(结构页))代码>您想要深度拷贝还是浅拷贝?