问一下这个感叹号代表什么意思?

cppnewer cppnewer 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
偶在研究C++链表的结构,弱弱地问一下if(!head)中的感叹号代表什么意思?
node* head_Create()
{ node *head,*n;
in a;
head=NULL;
cout<<"input";
for(cin>>a;a!=-1;cin>>a)
{
n = new node;
n->data=a;
if(!head) head=n;n->next=NULL;----感叹号什么意思
else n->next=head,head=n;
}
return head;
}
...全文

相关推荐

评论 10
收藏 已收藏
分享
返回顶部
cppnewer
C++ 语言 65,214 成员 250,514 内容