C語言中結構體的深拷貝和淺拷貝

C語言中結構體的深拷貝和淺拷貝 一、結構體的淺拷貝 1.結構體的淺拷貝是把一個結構體的內容拷貝到另外一個結構體,仔細看代碼就可以 #include <stdlib.h> #include <string.h> #include <windows.h> typedef struct teacher { char *name; int age; }teacher; int main() { te
相關文章
相關標籤/搜索