cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
comparing objects
comparing objects
Sep 17, 2009 at 7:14am UTC
compone87
(18)
how do we compare 2 objects if the function declaration has only one object as its parameter:
i.e. int compare(const school& teacher). "school" is the name of my class.
Sep 17, 2009 at 7:49am UTC
firedraco
(6247)
You...don't? Or you can use globals I suppose...
Sep 17, 2009 at 7:58am UTC
compone87
(18)
could u explain the code above?
Sep 17, 2009 at 8:50am UTC
firedraco
(6247)
What code...??
Sep 17, 2009 at 12:09pm UTC
Bazzy
(6281)
@firedraco
I think compone87 means this:
int
compare(
const
school& teacher)
@compone87
Is that a member of school? if so, it is comparing the object from which you are calling 'compare' with 'teacher'
Topic archived. No new replies allowed.