|
-
October 24th, 2006, 09:22 PM
#1
Operator Overload problem. Please help
I have the code as following
#define PRINT_PER_MINUTE 10;
class Printer
{
private:
int pages;
public:
Printer(int _pages)
{
pages = _pages;
}
int getPrintTime()
{
return pages * PRINT_PER_MINUTE;
}
};
bool Printer: perator<=(const Printer& pri)
{
return getPrintTime() <= pri.getPrintTime();
}
and I am getting an error message which states that "<= is not a member of Printer".
What should I do to fix this problem? Please help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|