I am trying an example from the GNU C Programming Tutorial (page 93) that uses a few of the math library routines listed.
#include <stdio.h>
#include <math.h>
int main() {
double my_pi;
my_pi = 4 * atan(1.0);
/* Print the value of pi, to 32 digits */
printf("my_pi = %.32f\n", my_pi);
/* Print value of pi from math library, to 32 digits */
printf("M_PI = %.32f\n", M_PI);
return 0;
}
When I compile the file 'main.c' using MinGw using the command,
gcc main.c -o main -lm
It gives the following error:
main.c:16:9: error: stray '\32' in program
16 : }
: ^