简体   繁体   English

如何将结构内容复制到另一个结构中,包括指针

[英]How to copy structure contents into another structure including pointers

I am trying to deep copy from one structure to another structure However structure has many pointers,how do I copy it in single statement?我正在尝试从一个结构深度复制到另一个结构但是结构有很多指针,如何在单个语句中复制它? Do I have to manually copy each structure pointer member?我是否必须手动复制每个结构指针成员?

You have to manually copy everything if you want a deep copy.如果您想要深拷贝,则必须手动复制所有内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM