User forums > General (but related to Code::Blocks)

cmath and math.h in Linux

(1/1)

slanker70:
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

killerbot:
#include <cmath>

and then :  std::acos ,  std::sqrt

MortenMacFly:

--- Quote from: slanker70 on June 01, 2009, 11:29:51 pm ---Can someone please help.

--- End quote ---
Luckily you received help even if you violate our forum rules. This is NOT a general programming forum. Topic locked.

Navigation

[0] Message Index

Go to full version