logoalt Hacker News

LtWorfyesterday at 5:44 PM1 replyview on HN

If it's not in the .h file it's supposed to be a private function.


Replies

zabzonkyesterday at 6:54 PM

you can access it using extern from anywhere:

    // a.c
    int f( int x ) {
        return x + 1;
    }

    // b.c
    extern int f(int x );

    int main() {
        int y = f(41);
    }
but if f() had been defined as static, you couldn't do this.
show 2 replies