News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

cmath and math.h in Linux

Started by slanker70, June 01, 2009, 11:29:51 PM

Previous topic - Next topic

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.
Luckily you received help even if you violate our forum rules. This is NOT a general programming forum. Topic locked.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]