Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
visual c++ is made by microsoft and thus... it has bugs... :lol:
M_PI is not defined in microsofts math.h, so you'll need to define it yourself
#include <stdio.h>
#define M_PI 3.1415926535897932385
void main()
{
printf("M_PI = %.15f\n", M_PI);
}
also note that the line
float M_PI; is removed from your main function...
if something is defined (by you or in a header file) you shouldn't make a variable with the same name...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.