Suppose your program contains the following class definition (along with
definitions of the member functions):
class YourClass
{
public:
YourClass(int newInfo, char moreNewInfo);
YourClass();
void doStuff();
private:
int information;
char moreInformation;
};
Which of the following are legal?
YourClass anObject(42, 'A');
YourClass anotherObject;
YourClass yetAnotherObject();
anObject = YourClass(99, 'B');
anObject = YourClass();
anObject = YourClass;
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here