pow() isn’t defined [closed]

This is a linker failure. You need to link with the math library, specify -lm at the end of your compiler command. From man pow:

Link with -lm.

Leave a Comment