S
Steve McLellan
Hi,
Is there any reason why the VC2003 C++ compiler emits the error "Function
must return a value" for global functions and not for class member
functions?
For example:
int test()
{
}
// Generates the error
class Test
{
int test() {} // Doesn't generate the error
};
I'm compiling with /clr if that makes any difference (though the class in
question is not managed). Warning level's 3, but even on four it doesn't
appear and as I've said, the error gets thrown up for global funcs. For once
I WANT my code not to compile
Steve
Is there any reason why the VC2003 C++ compiler emits the error "Function
must return a value" for global functions and not for class member
functions?
For example:
int test()
{
}
// Generates the error
class Test
{
int test() {} // Doesn't generate the error
};
I'm compiling with /clr if that makes any difference (though the class in
question is not managed). Warning level's 3, but even on four it doesn't
appear and as I've said, the error gets thrown up for global funcs. For once
I WANT my code not to compile
Steve