08 2022 档案

摘要:源代码 Cmake_demo.zip 案例1:无静态库、动态库参与 文件目录结构1 假设include目录存放头文件data.h包含函数声明,src目录存放对应的data.cpp文件包含函数定义、以及一个全局变量。main.cpp存放在文件根目录、包含main函数入口。 代码内容 常规编译指令 g+ 阅读全文
posted @ 2022-08-24 17:54 爱吃砂糖橘的白龙 阅读(448) 评论(0) 推荐(0) 编辑
摘要:from functools import wraps def decorator(func): """this is decorator __doc__""" @wraps(func) def wrapper(*args, **kwargs): """this is wrapper __doc__ 阅读全文
posted @ 2022-08-21 10:59 爱吃砂糖橘的白龙 阅读(20) 评论(0) 推荐(0) 编辑
摘要:可以基于typedef、using等关键词实现 typedef std::vector<int> intvec; using intvec = std::vector<int>; //这两个写法是等价的 另一个例子,函数指针: typedef void (*FP) (int, const std:: 阅读全文
posted @ 2022-08-17 16:49 爱吃砂糖橘的白龙 阅读(73) 评论(0) 推荐(0) 编辑
摘要:方式1 struct stu{ char const *name; //姓名 int num; //学号 char sex; //性别 float score; //成绩 }; int main(){ struct stu s1={"www",1,'m',100.0}; stu s2={"ccc", 阅读全文
posted @ 2022-08-17 10:38 爱吃砂糖橘的白龙 阅读(110) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示