- 博客(3)
- 收藏
- 关注
原创 C++ 权限控制
C++ 中权限控制防止误修改C++权限:publicprotectedprivate 默认权限this 表示当前对象#include <stdio.h>class Student {private: char *name; int age; public: void setName(char *name) { this->name = nam...
2020-02-07 16:54:29
213
原创 C 语言中结构体内定义函数
结构体中引入函数#include <stdio.h>struct student { char *name; int age; void (*printInfo)(struct student *stu);};void printInfo(struct student *stu){ printf("name = %s, age = %d", stu->na...
2020-02-07 16:32:53
20190
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人