This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

compile error on simple code , plz help


eric@eric-laptop:~/practicalCpp$ g++ fixed_pt.cpp fixed_test.cpp
In file included from fixed_pt.cpp:3:
fixed_pt.h:211: error: ?fixed_pt::fixed_pt fixed_pt::fixed_pt::operator+(const fixed_pt::fixed_pt&, const fixed_pt::fixed_pt&)? must take either zero or one argument
fixed_pt.h:216: error: ?fixed_pt::fixed_pt fixed_pt::fixed_pt::operator+(const fixed_pt::fixed_pt&, double)? must take either zero or one argument
fixed_pt.h:221: error: ?fixed_pt::fixed_pt fixed_pt::fixed_pt::operator+(double, const fixed_pt::fixed_pt&)? must take either zero or one argument
fixed_pt.h:226: error: ?fixed_pt::fixed_pt fixed_pt::fixed_pt::operator-(const fixed_pt::fixed_pt&, const fixed_pt::fixed_pt&)? must take either zero or one argument
fixed_pt.h:231: error: ?fixed_pt::fixed_pt fixed_pt::fixed_pt::operator-(const fixed_pt::fixed_pt&, double)? must take either zero or one argument
fixed_pt.h:236: error: ?fixed_pt::fixed_pt fixed_pt::fixed_pt::operator-(double, const fixed_pt::fixed_pt&)? must take either zero or one argument
fixed_pt.h:241: error: ?fixed_pt::fixed_pt fixed_pt::fixed_pt::operator*(const fixed_pt::fixed_pt&, const fixed_pt::fixed_pt&)? must take either zero or one argument
fixed_pt.h:246: error: ?fixed_pt::fixed_pt fixed_pt::fixed_pt::operator*(const fixed_pt::fixed_pt&, double)? must take either zero or one argument
-------------------
I just copy a couple lines of compiler result from my g++
all three files fixed_pt
                fixed_test
are copied from a book
practical c++ programming

so plz help
sincerely, Eric Lin, in USA-US citizen

Attachment: fixed_pt.cpp
Description: fixed_pt.cpp

Attachment: fixed_pt.h
Description: fixed_pt.h

Attachment: fixed_test.cpp
Description: fixed_test.cpp


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]