Demo entry 6763010

cplusplus

   

Submitted by anonymous on Oct 18, 2018 at 11:21
Language: C++. Code size: 259 Bytes.

#include<iostream>

using namespace std;

class R {
    /**
     * 定义类R
     */

//定义外部接口
public:
    R(int r1, int r2) : r1(r1), r2(r2) {};//定义构造函数
    void print();

    void print() const;//定义常成员函数

//定义私有数据成员
private:
    int r1, r2;
};

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).