`
wangleide414
  • 浏览: 606622 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

previous implicit declaration of 'some_function' was here

 
阅读更多

error: previous implicit declaration of 'some_function' was here的解决办法

error: previous implicit declaration of 'some_function' was here

Solution: Didn't your programming teacher tell you to always make function prototypes? He/she had good reason. It's also best to have them at the top, global space of the file, not in weird places. Yes, I have seen a function declared within another function, just before it gets called. Try to avoid that!

 

原因:注意函数在声明的时候注意顺序。

在写源代码的时候

|***********|

|** A******|

|** B******|

|***********|

其中A函数要调用B函数,此时就会在A函数处出现 previous implicit declaration of B was here的现象。

如果将代码改为

|***********|

|** B******|

|** A******|

|***********|此时在A里调用B便不会出现错误了.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics