#2920. C++-编译-warning: no return statement in function returning...

C++-编译-warning: no return statement in function returning...

Background

Description

#include <iostream>

using namespace std;
bool test_bool()
{
}
int main(int argc, char *argv[])
{
    (void)argc,(void)argv;
    bool ret;
    if( (ret = test_bool()) ){
        cout << "Hello World!" << endl;
    }
    return 0;
}

有符号的函数,没有return。实例中bool test_bool() 没有return false或者true。根据实际情况加上就好了。

Format

Input

Output

Samples



Limitation

1s, 1024KiB for each test case.