您当前的位置: 首页 >  c++

c++中this指针的使用,其实就是指类本身

ZhangJiQun&MXP 发布时间:2018-10-13 00:55:58 ,浏览量:6

目录

 

c++中this指针的使用,其实就是指类本身

  c++中this指针的使用,其实就是指类本身
#include 
using namespace std;

class Aa {

    public:
    int a,s;
    void fuzhi(int r,int t){
        this ->a=r;//使用a=r,可以达到同样 的效果
        this ->s=t;//使用s=t,可以达到同样 的效果
        cout             
关注
打赏
1688896170
查看更多评论
0.3302s