Solved

math.h error..

Posted on 2001-09-14
3
581 Views
Last Modified: 2007-11-27
I'm using math.h in my C++ application trying to compile that using Sun WorkShop 6 update 1 C++ 5.2 2000/09/11 compiler but hitting the following error
"/usr/include/math.h", line 189: Error: The name exception is ambiguous, exception and std::exception." there is a structure by name exception in math.h probably bcoz of that.. not able to proceed further does anyone have any idea or got an error like this?? please help... well if I use this option during compilation -library=Cstd then I can get rid of this error, but then I want to use Cstd library for lot of other standard template classes.

Lalitha
0
Comment
Question by:alalitha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
Axter earned 100 total points
ID: 6482389
Have you tried using the extensionless version?

#include <cmath>
0
 
LVL 30

Expert Comment

by:Axter
ID: 6482397
You're probably getting this because you're mixing extensionless headers with extension headers and using the "using namespace std".

Try either using all extensionless headers, or try not declaring "using namespace std".
0
 

Author Comment

by:alalitha
ID: 6482503
thanks changed to #include <cmath> and it worked but its giving warnings like this not able to figure out these

__1cDstdElist4nFRecSt_n0AJallocator4n0B____Ferase6Mn0DIiterator_2_2_ is out-of-date and will be regenerated
__1cDstdElist4nFRecSt_n0AJallocator4n0B____U__deallocate_buffers6M_v_ is out-of-date and will be regenerated
__1cDstdElist4nFRecSt_n0AJallocator4n0B____M__insert_aux6Mn0DIiterator_Irkn0B__v_ is out-of-date and will be re
generated

Lalitha
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question