摘要: 面试之自定义字符串操作 strcpy #include <assert.h> char *strcpy(char *dest, const char *src) { assert( (dest != NULL) && (src != NULL); char *address = dest; whil 阅读全文
posted @ 2020-08-21 15:01 Chilk 阅读(111) 评论(0) 推荐(0) 编辑
摘要: ##C与C++中struct的区别 在c语言中,不能直接用结构体来声明变量,如果想在c语言中直接用结构体名定义变量,需要用到 typedef 在c++中,可以直接用结构体来声明变量 //c语言// //声明 struct stu { ... }; //定义 struct stu student; t 阅读全文
posted @ 2020-08-21 14:38 Chilk 阅读(261) 评论(0) 推荐(0) 编辑