文件名称:C++类学习资料
介绍说明--下载内容来自于网络,使用问题请自行百度
1.编写一个类,声明一个数据成员和一个静态数据成员,其构造函数初始化数据成员,并把静态数据成员加1,其析构函数把静态数据成员减1。
(1) 编写一个应用程序,创建该类的3个对象,然后显示其数据成员和静态数据成员,再析构每个对象,并显示它们对静态数据成员的影响。
(2) 修改该类,增加静态成员函数并访问静态数据成员,并声明静态数据成员为保护成员。体会静态成员函数的使用,静态成员之间与非静态成员之间互访问题。
-1 write a class, declare a data member, and a static data member, its constructor initializes data members, and to add a static data member, its destructor decrements the static data member.
(1) preparation of an application, create a class of three objects, then displays its data members and static data members, then each object destructor, and shows their impact on the static data member.
(2) to modify the class, add a static member functions and access static data members and static data members declared as protected members. Understand the use of static member functions, static members and non-static members of the exchange of visits between the problem
(1) 编写一个应用程序,创建该类的3个对象,然后显示其数据成员和静态数据成员,再析构每个对象,并显示它们对静态数据成员的影响。
(2) 修改该类,增加静态成员函数并访问静态数据成员,并声明静态数据成员为保护成员。体会静态成员函数的使用,静态成员之间与非静态成员之间互访问题。
-1 write a class, declare a data member, and a static data member, its constructor initializes data members, and to add a static data member, its destructor decrements the static data member.
(1) preparation of an application, create a class of three objects, then displays its data members and static data members, then each object destructor, and shows their impact on the static data member.
(2) to modify the class, add a static member functions and access static data members and static data members declared as protected members. Understand the use of static member functions, static members and non-static members of the exchange of visits between the problem
(系统自动生成,下载前可以参看下载内容)
下载文件列表
C++.doc
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
