i cant get the pow() function in math.h to work in a function other than main. heres my code
(note its not complete)Code:#include <stdio.h> #include <math.h> int bintoint(char * bin); int main() { printf("%lf", pow(2, 8)); return 0; } int bintoint(char * bin) { int count = 0, total = 0, temp = 1; while (bin[count] != '\0') { count++; } while(count-- != 0) { printf("%lf", pow(2, count)); } return total; }
can you tell me how to fix this?