this指针

this指针,通常是用在结构体中来指向自身的指针。

简单举个例子就可以理解了:

struct ju
{
    int r,c;
    void init(int r,int c)
    {
        this->r=r,this->c=c;//矩阵结构体中的变量r,c的指针修改。 
    }
}

 

posted @ 2017-07-19 21:34  GSHDYJZ  阅读(149)  评论(0编辑  收藏  举报