搜索资源列表
6
- 设计一个类,用自己的成员函数重载运算符,使对整型的运算符=、+、-、*、/ 适用于分数运算。要求: (1)输出结果是最简分数(可以是带分数); (2)分母为1,只输出分子。 -Design a class, with their overloaded operator member function, so that the operator on the integer =,+,-,*,/ apply to scores of computing. Requirements: (1
11
- /*定义一个基类Animal,有私有整型成员变量age,构造其派生类dog, 在其成员函数SetAge(int n)中直接给age赋值,看看会有什么问题, age改为公有成员变量,还会有问题吗?-/* Define a base class Animal, a private integer member variables age, derived class constructor of its dog, its member function SetAge (int n) dire
template
- 设计一个类模板,申明一个成员函数,用该函数得到两个数据,求最大值-Design a class template, declare a member function, using the function to get two data, the maximum value
