QuantumG wrote:

> Erik de Castro Lopo wrote:
> 
> >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();
> }

Sorry, I don't think that is an answer. In particular, it does
not match C++'s scope resolution operator.

What we need to be able to do is:

    void bar(int foo)
    {
       /* Use foo the function. */
        x = foo();

        /* Use foo the integer. */
        x += foo;

       /* Use foo the function. */
        x = foo();
    }

Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo  [EMAIL PROTECTED] (Yes it's valid)
+-----------------------------------------------------------+
"Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea."  -- Alexander Viro on linux-kernel mailing list
-- 
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