John Harrison wrote:
meagar wrote: For future questions, it would help to include the error message your
compiler is giving you.
At a glance, I'd guess you might be redefining 'strlen', which is
already a standard function for finding the length of c-style strings.
That won't cause a compile error. The local name will just hide the
global one.
I think the names of C standard library functions are all reserved
identifiers at any scope. This is in case the standard library
functions are implemented with macros, eg:
#define strlen(s) ( find_eos(s) - (s) )
I can't find exact wording to support this, but N869 7.1.4#1 says:
"Any function declared in a header may be additionally
implemented as a function-like macro defined in the header"