c++ 指针,函数指针,类指针
1、Pointer ( 指针 ) refers directly to the value that it points to.
所以,
指针储存了整型数据的地址
基本 syntax 为:
int *mpointer = &foo;
在 c++ 中的应用为:
2、Pointer also can point to an array( 数组 )
基本 syntax 为:
int *mpointer = ary;
在 c++ 中的应用为:
3、Pointer to display a matix ( 矩阵 )
基本 syntax 为:
*( foo[ j ] + i )
foo[ j ]:表示为 pointer to the [ j ]th colume of matrix
foo[ j ] + i:表示为 pointer to cell of matrix in the [ j ]th colume
在 c++ 中的应用为:
4、Function Pointer( 函数指针 )
基本 syntax 为:
int (*func)()
在 c++ 中的应用为:
5、call function pointer from another function( 函数中输入函数指针 )
在 c++ 中的应用为:
6、Pointer to Class( 类指针 )
在 c++ 中的应用为:
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:139
阅读量:123
阅读量:144
阅读量:75
阅读量:76