Erik de Castro Lopo wrote:

OK, you are suggesting that the compiler should treat parameter
names and function names as being in separate name spaces.

If you then have a function named foo and parameter named foo
and you use foo in your function? How does the compiler distinguish between foo the parameter and foo the function? C++ has the scope resolution operator ::, but C has no such mechanism.

Use the extern keyword:

int foo() {
 return 5;
}

void bar(int foo)
{
 extern int foo();
 foo();
}

enjoy :)

Trent
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to