传智扫地僧课程学习笔记。
C++中,
struct声明的对象,
被认为是一种新的数据类型,
后面可以直接使用,比如Teacher结构体,Teacher t1;
而C中,却不行,需要struct Teacher t1;
这里虽然不知道有什么用,
先记着呗~
class c1
{
public:
protected:
private:
};
struct Teacher
{
public:
char name[32];
int age;
protected:
int a;
};