473,472 Members | 2,208 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Compiler error using C++ V6 Update 2

Hi,
I have a program that compiles fine when I use -
CC: Sun WorkShop 6 2000/04/07 C++ 5.1 .
But the exact same program when compiled with -
CC: Sun WorkShop 6 update 2 C++ 5.3 2001/05/15
gives me an error - Error: The name exception is ambiguous, exception
and std::exception

What would have changed between these two compilers to suddenly have my
program throw this error?

The program looks something like this -
#include <it.h>
#include <exception>
using std::unexpected;

class testClass;
extern testClass *exception;
class testClass {
public :
class testClass *exp;
testClass(){
cout <<" I am in const";
exp=exception;
}

};

Any help or information would be very much appreciated.

Thanks and Regards,
Abhi

Apr 24 '06 #1
1 1683
Abhi wrote:
I have a program that compiles fine when I use -
CC: Sun WorkShop 6 2000/04/07 C++ 5.1 .
But the exact same program when compiled with -
CC: Sun WorkShop 6 update 2 C++ 5.3 2001/05/15
gives me an error - Error: The name exception is ambiguous, exception
and std::exception

What would have changed between these two compilers to suddenly have
my program throw this error?
Shouldn't you be asking Sun Microsystems about it? Or at least in the
newsgroup dedicated to Sun development tools or their OS?
The program looks something like this -
#include <it.h> ^^^^^^
And what's there?
#include <exception>
using std::unexpected;

class testClass;
extern testClass *exception;
class testClass {
public :
class testClass *exp;
testClass(){
cout <<" I am in const";
exp=exception;
}

};

Any help or information would be very much appreciated.


It _seems_ that somehow, somebody, somewhere (before that line), brought
the name 'std::exception' into the current scope (perhaps by means of the
'using' directive). In any case, you get a "name clash", so you could
either track down and fix the reason for 'exception' class name to be in
your scope or rename your pointer to avoid the conflict with the standard
class name.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Apr 24 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: paul calvert | last post by:
I hope somewhere here has encountered and solved a similar problem in the past. 1) on a new Win2000 PC: installed Visual C++ 6.0 download & install single file Service Pack 5.0 2) try to...
8
by: jon morgan | last post by:
OK, I'm going to be brave. There is a bug in VS.Net 1.1 that causes random compiler errors. I have raised this issue in posts at least three time in the past couple of months without attracting...
13
by: Andrew | last post by:
I use conditional compiler constants, set through the VBA IDE in Tools, <projectname> Properties, that I refer to throughout my code to control which code is used during development, and which...
5
by: Michael Kennedy [UB] | last post by:
Hi, I would like to report some weird behavior which results in an internal compiler error in VS.NET 2003 (VC++). I have an ATL COM dll project which also uses MFC. This solution (workspace...
3
by: Robert | last post by:
Every time I navigate to any .aspx file on my computer, I get the error below. According to MSDN this indicates that my CLR is corrupt, but I've re-installed the .NET framework with no help. Also...
2
by: mohmo | last post by:
I am working with a program which was developed using VC++ 6.0 few years ago. Now I am modifying par of the code and compile it using VC++ 2003 .net. In the beginning I had a lot of problems with...
4
by: mike | last post by:
I need to do a minor update to a 8051 program written in assembler in 1994 and assembled on a machine/language that no longer exists. I wrote the program, so I have some idea how it works. The...
2
by: dasilva109 | last post by:
Hi guys I am new to C++ and need urgent help with this part of my code for a uni coursework I have to submit by Thursday //ClientData.h #ifndef CLIENTDATA_H #define CLIENTDATA_H #include...
27
by: Dave | last post by:
I'm having a hard time tying to build gcc 4.3.1 on Solaris using the GNU compilers. I then decided to try to use Sun's compiler. The Sun Studio 12 compiler reports the following code, which is in...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.