User forums > Using Code::Blocks

Pow and Math.h

<< < (3/3)

transfrank:
Hello,
I did

--- Code: ---#include <cmath>
using name space std;
--- End code ---

and upon compilation, code::blocks opens up the cmath file and gives the following error message for all the math functions, (e.g. like for arc cosine):

--- Code: ---error '::acos' has not been declared
--- End code ---

Also, I added under Project build options-> linker settings->link libraries : m for math.
Advice on what us wrong?
Thanks,
Frank

stahta01:

--- Quote from: transfrank on March 15, 2008, 05:21:42 am ---
--- Code: ---#include <cmath>
using name space std;
--- End code ---

--- End quote ---

It is namespace not name space!

Tim S

transfrank:
I did namespace in the code and just typed it too quickly here. So my problem persists.

Navigation

[0] Message Index

[*] Previous page

Go to full version