什么时候强制性的?

时间:2018-08-22 15:58:56

标签: c++ class this

让我们考虑以下课程:

class test{
    private:
    int n;
    //...
    public:
    int get_n(void){
           return n;}
    int get_this_n(void){
           return this->n;}
    //...
};

get_n和get_this_n有什么区别? 什么时候强制性的?

0 个答案:

没有答案