#ifndef INT_H
#define INT_H
class Int {
private:
int value;
public:
//请在以下空白书写功能构造函数,此处要求以一个整型作为参数
/********** Begin **********/
/********** End **********/
//请不要改动以下成员函数
int getValue()const {return value;}
};
#endif
主函数如下:
#include "Int.h"
#include
using namespace std;
int main() {
int x;
cin >> x;
Int a(x);
cout << a.getValue() << endl;
return 0;
}