bug-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem with operator overloading


From: aron beal
Subject: problem with operator overloading
Date: Thu, 1 May 2003 21:53:02 -0700 (PDT)

Hi,
I'm working on a school assignment, and I may have come across a bug(?)
We're doing operator overloading, and when I call the overloaded ==
operator, it seems to assign to the input parameter the value of the
calling class.
I've attached the relevant files.  Date.h is the file where all the
work gets done; datetest.c is just a test program.  The error shows up
when I call with the command line arguments as so:

%>g++ datetest.c -o datetest
%>datetest 2/21/00 3/9/00

The error shows up when compiled using g++, version 3.2.1, on Red Hat 8.0.
I've gone over my code repeatedly, and while I'm no guru by any stretch,
I'm 99% sure it's not some assignment I've done by mistake.  The code
works on a Solaris box, using the same version of compiler.

Thanks for looking; hope to hear back.

Aron Beal

Attachment: wtf.tar
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]