66问答网
所有问题
c++里面的函数前面加上一个*号这个是什么意思的?
例如struct student *insert(struct student *head) 这个结构体的struct student *insert这个在insert前面加上*号和不加有啥区别吗?
举报该问题
推荐答案 推荐于2018-05-12
这个*号不在和函数连在一起的,是函数返回值的一部分struct student *insert(struct student *head)这个函数的返回值就是,struct student *
温馨提示:答案为网友推荐,仅供参考
当前网址:
http://66.wendadaohang.com/zd/ssD9vDD29.html
其他回答
第1个回答 2018-05-21
表示子程序返回来的是结构指针。在子程序中对head进行处理后,得到新的head,返回时用: return head;}
你可以把返回的head有赋个另一个struct student 定义的结构指针,如*p:
struct student *p;
p=insert( head);
应当很好理解。一般编程时,为了准确期间,都要传指针,特别是在嵌入式编程时。
第2个回答 2013-05-27
它返回的类型是指针型的
相似回答
大家正在搜
相关问题
c++中的函数前面加个LRESULT是什么意思
C++函数名前面加&是什么意思
c++函数前面加"&"有什么作用???
c++函数名前加&是什么意思
c++调用的函数前加 ":"代表什么意思
C++参数前加&是什么意思?
C++函数名的前面有&或是*符号,是什么意思
C++函数名的前面有&或是*符号,是什么意思?