摘要:
C++语言继承了 C语言的 struct,并且加以扩充。在 C语言中,struct 是只能定义数据成员,而不能定义成员函数的。... 阅读全文
posted @ 2022-08-19 22:48
luoganttcc
阅读(17)
评论(0)
推荐(0)
摘要:
C++语言继承了 C语言的 struct,并且加以扩充。在 C语言中,struct 是只能定义数据成员,而不能定义成员函数的。... 阅读全文
posted @ 2022-08-19 22:48
luoganttcc
阅读(19)
评论(0)
推荐(0)
摘要:
#includeusing namespace std;class book{public: void setprice(do... 阅读全文
posted @ 2022-08-19 22:48
luoganttcc
阅读(7)
评论(0)
推荐(0)
摘要:
#includeusing namespace std;class book{public: void setprice(do... 阅读全文
posted @ 2022-08-19 22:48
luoganttcc
阅读(7)
评论(0)
推荐(0)
摘要:
类中可以声明变量和函数,为了将类对象的内部实现与外部行为分离开来,C++语言为类提供了封装机制,与之相关的三个关键字分别是:priv... 阅读全文
posted @ 2022-08-19 22:48
luoganttcc
阅读(14)
评论(0)
推荐(0)
摘要:
类中可以声明变量和函数,为了将类对象的内部实现与外部行为分离开来,C++语言为类提供了封装机制,与之相关的三个关键字分别是:priv... 阅读全文
posted @ 2022-08-19 22:48
luoganttcc
阅读(14)
评论(0)
推荐(0)
摘要:
#include#includeusing namespace std;class student{ char name[20... 阅读全文
posted @ 2022-08-19 22:48
luoganttcc
阅读(8)
评论(0)
推荐(0)
摘要:
#include#includeusing namespace std;class student{ char name[20... 阅读全文
posted @ 2022-08-19 22:48
luoganttcc
阅读(27)
评论(0)
推荐(0)
摘要:
#include #includeusing namespace std;//c++的引用 实现交换变量void swap(int ... 阅读全文
posted @ 2022-08-19 22:48
luoganttcc
阅读(16)
评论(0)
推荐(0)
摘要:
#include #includeusing namespace std;//c++的引用 实现交换变量void swap(int ... 阅读全文
posted @ 2022-08-19 22:48
luoganttcc
阅读(28)
评论(0)
推荐(0)

浙公网安备 33010602011771号