I have included the math.h header file.
If I do something like
float var = pow(2, 3)
it complies and there aren't any errors. But if I try something like
float var2 = 5;
float var = pow(var2, 2)
it doesn't compile and gives me the error
undefined reference to `pow' collect2: error: ld returned 1 exit status
I am not very familiar with c, but I have no idea why this is happening, as it is fine without using a variable. It's like if I use a variable in the pow function, it gives me this error. I am using Xubuntu and then run the command
"cc -g -std=c99 myfile.c
to compile the program.