E
Enc5
data structures teacher gave me like 50 questions, I have a few I'm not
sure about. My last c++ class was like 8 months ago and I can't
remember a lot of things. If anyone could help me on any of the
following questions, it'd be great.
Find the errors in the follwing code:
-First one
class mystery //line 1
{
...
bool operator <= (mystery); //line 2
...
};
bool mystery::<=(mystery rightObj) //line 3
{
...
}
-Second one
class mystery //line 1
{
...
friend operator+ (mystery); //line 2
//Overload the binary operator +
...
};
And the last ones are:
How many parameters are required to overload the preincrement operator
for a class as a friend function?
How many parameters are required to overload the postincrement operator
for a class as a member function?
Any help would be appreciated.
sure about. My last c++ class was like 8 months ago and I can't
remember a lot of things. If anyone could help me on any of the
following questions, it'd be great.
Find the errors in the follwing code:
-First one
class mystery //line 1
{
...
bool operator <= (mystery); //line 2
...
};
bool mystery::<=(mystery rightObj) //line 3
{
...
}
-Second one
class mystery //line 1
{
...
friend operator+ (mystery); //line 2
//Overload the binary operator +
...
};
And the last ones are:
How many parameters are required to overload the preincrement operator
for a class as a friend function?
How many parameters are required to overload the postincrement operator
for a class as a member function?
Any help would be appreciated.