Solved

math.h error..

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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…
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 viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
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.

747 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

10 Experts available now in Live!

Get 1:1 Help Now