一、特点
深拷贝,拷贝后的两个对象互不影响干扰
二、示例
#include <iostream>
typedef struct __TEST__
{
char first[256];
char second[256];
}Test;
int main()
{
Test t2;
{
Test t;
strcpy_s(t.first, "hello");
strcpy_s(t.second, "world");
t2 = t;
std::cout << "t.pcName: " << t.first << " t.pcPath: " << t.second << std::endl;
}
std::cout << "t2.pcName: " << t2.first << " t2.pcPath: " << t2.second << std::endl;
return 0;
}