[LC++]using std::
Dr Mark H Phillips
mark at austrics.com.au
Thu May 15 14:57:02 UTC 2003
On Thu, 2003-05-15 at 14:41, alain wrote:
> Hello,
>
> I have a little problem with "using".
>
> \\...
> #include <cmath>
> \\...
> main{
> \\
> }
> $c++ test.cpp
> I had no error messagge, else if I write
> \\...
> #include <cmath>
> using std::math;
What object is "math" supposed to be? Is it a function or a
variable or a class? I am not aware that there is any such
object.
Perhaps you meant to write:
using namespace std;
?
> \\...
> main{
> \\
> }
> $c++ test.cpp
> I had the error: "math not declared".
>
> This error happens on a Mdk 9.0 system (gcc3.2???) but not on my debian
> 3.0 box (gcc2.95).
> What's wrong?
C++ version 2.95 seems to essentially ignore namespaces where as version
3.2 deals with them properly.
Cheers,
Mark.
> Regards,
>
> alain
>
> --
> alain <alainbe at free.fr>
>
> _______________________________________________
> This is the Linux C++ Programming List
> : http://lists.linux.org.au/listinfo/tuxcpprogramming List
--
Dr Mark H Phillips
Research Analyst (Mathematician)
AUSTRICS - smarter scheduling solutions - www.austrics.com
Level 2, 50 Pirie Street, Adelaide SA 5000, Australia
Phone +61 8 8226 9850
Fax +61 8 8231 4821
Email mark at austrics.com.au
More information about the tuxCPProgramming
mailing list