转载
https://www.iteye.com/blog/wangleide414-1707160
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便不会出现错误了.