Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: slanker70 on June 01, 2009, 11:29:51 pm

Title: cmath and math.h in Linux
Post by: slanker70 on June 01, 2009, 11:29:51 pm
Hi,

I'm having problem regarding these 2 math functions:

1. acos
2. sqrt

If I include math.h it coudn't find sqrt, and if I include cmath it says that acos is undefined.

So I view the cmath header file and inside it includes math.h, but when I try to open math.h it says that file is not found. SO ithink my math.h is missing in Linux.

Can someone please help.

Regards,

Dana
Title: Re: cmath and math.h in Linux
Post by: killerbot on June 02, 2009, 06:49:37 am
#include <cmath>

and then :  std::acos ,  std::sqrt
Title: Re: cmath and math.h in Linux
Post by: MortenMacFly on June 02, 2009, 07:20:49 am
Can someone please help.
Luckily you received help even if you violate our forum rules. This is NOT a general programming forum. Topic locked.