Identify the constructor like this: If the constructor for class A with two int arguments is called, respond with A(int, int).
Given the class definition,
```
class A
{
public:
A(){}
A(int x, char y):xx(x), yy(y) {}
// other members
private:
int xx;
char yy;
};
```
Tell which definition below is legal.
If legal, tell whether it is a definition of an object of class A.
If the definition is a legal and defines a class A object, tell which constructor is called for each of the following definitions.
a) A x(2, ‘A’);
b) A x;
c) A x = A(2, ‘A’);
d) A x(1);
e) A x( );
a) A x(2, ‘A’); , b) A x; , and c) A x = A(2, ‘A’);
d) is not legal. It tries to call A(int), but there is no such constructor defined. Part e) defines a function taking no arguments and returning a class A object.
You might also like to view...
In the function round of Display 3.6, which of these explains what happens in the body of the function? We reproduce the one line from the function body here:
```
return static_cast
String objects are immutable. This means they ________.
a. must be initialized b. cannot be deleted c. cannot be changed d. None of the abov
In a split database, typically, the file containing the back end would reside on the ________ that all departments can access
A) network server B) web browser C) internet D) Navigation Pane
Which of the following section breaks does not have to begin at the top of a page?
A) Odd Page B) Even Page C) Next Page D) Continuous