Default return value of a boolean type return function in c++ [duplicate]
Possible Duplicate:
Why can you return from a non-void function without returning a value without producing a compiler error?
According to the c++ standard what should be the return value of the following function.
bool done()
{
// no return value
}
This would be undefined behavior - anything can happen.
Although it returns a value, it is undefined.
精彩评论