Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

math.h error..

Posted on 2001-09-14
3
Medium Priority
?
591 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 300 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

Industry Leaders: 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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

885 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