if I do:
void foo() {
if( .. ) {
inline int baa(..) { return .. }
} else {
inline int baa(..) { return .. }
}
}
And call: baa(..)
inside foo
function I get implicit declaration of 'baa'
.
But if I do prototype declaration: inline int baa(int);
the error is inline function 'baa' declared but never defined
. I'm using inline function to replace macro-function.
How to fix this?
EDIT better: can someone explain why the compiler claims the above error message?