I wrote this C code to find the value for three squares.
#include <stdio.h>
#include <math.h>
int main( void )
{
float a;
a = powf( 3, 2 );
printf( "\n%f\n", a );
return 0;
}
I get a warning implicit declaration of function 'powf'even when the library is on math.hand -lmin the terminal command:
gcc -o test.exe -ansi -Wall test.c -lm
My version of gcc is 4.2.2 if that helps.
source
share