Solved

math.h error..

Posted on 2001-09-14
3
579 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SendMessage fails while PostMessage works 2 107
Fully specialized class template function 21 130
VS2015 compilation and missing DLLs 9 114
I could not build boost code, 10 78
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
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 …
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.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now