69,371
社区成员
发帖
与我相关
我的任务
分享
/*
果然是错误的!
测试环境:
测试结果:
CSDN55.cpp: In function `int main()':
CSDN55.cpp:9: void value not ignored as it ought to be
CSDN55.cpp:9: in argument to unary !
*/
1 #include <iostream>
2 using namespace std;
3 void func()
4 {
5 }
6
7 int main()
8 {
9 if (!func())
10 {
11 cout<<"TEST"<<endl;
12 }
13 else
14 {
15 cout<<"Another TEST"<<endl;
16 }
17 }