Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

library math.h 1

Status
Not open for further replies.

XoFF

Programmer
Jun 22, 2003
23
0
0
GB
i use microsoft visual (c/c++). When I include library math.h and in program i use M_PI i get error : error C2065: 'M_PI' : undeclared identifier

tx 4 help
 
>> i get error : error C2065: 'M_PI' : undeclared identifier

To solve those compiler errors, use only identifiers that [blue]are[/blue] declared.

Try something like this:
Code:
#ifndef M_PI
# define M_PI 3.14159265358979323846
#endif // M_PI

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top