Encountered an error when compiling the code:
error: called object ‘xxx’ is not a function or function pointer|
Cause: Mathematical expression is wrong or some mathematical function is used but the header file containing it is not imported
Solution:
- Check whether the mathematical expressions in the code are written incorrectly. Common mistakes are the omission of the multiplication sign'*' or the division sign'/' in the expression, which is incorrectly written as'÷', and the parentheses in the array do not match, such as: Wrongly write
arry[i]
as arry(i)
or write arry[i][j]
as arry[i,j]
, etc.
- If you use library functions such as absolute value, trigonometric function, etc., check whether the header file
<math.h>
is added