error: conflicting types for 'f' and previous declaration of 'f' was here

前端 未结 3 848
广开言路
广开言路 2021-01-06 20:38

This code is just a situation that I found in my actual code which is very big so I\'m giving this.here in this code the structure \"struct node\" is not defined it

3条回答
  •  时光说笑
    2021-01-06 20:53

    remove the extern from the header. When you declare a function as external, you guide the compiler that the function is not going to be compiled, and any reference to that function will be resolved in the linkage. Usually, this declaration is done when working with pre compiled libraries.

提交回复
热议问题