Using extern keyword to call functions

后端 未结 4 1386
借酒劲吻你
借酒劲吻你 2021-01-21 21:37

I want to call functions defined in test.c from other.c.

Can I extern the function1 to call it? Also, do I have to use extern in <

4条回答
  •  自闭症患者
    2021-01-21 22:13

    extern simply tells us that it is defined somewhere else. And you are using it in the file you are writing the extern. But functions are by default extern. So you need not be explicit about it.

提交回复
热议问题