What changes need to be made to the following class in order to change it to a template class?
class containerClass
{
public:
containerClass();
containerClass(int newMaxSize);
containerClass(const containerClass& source);
~containerClass();
int getItem();
int getCount();
int getSize();
void addItem(int item);
private:
int *bag;
int maxSize, count;
};
a. add the template prefix
b. change all occurrences of int to T
c. change the parameter type of addItem to T
d. change the return type of getItem to T
e. change the return type of getSize to T
f. change the parameter type of the implicit constructor to T
g. A and B
h. A and C and D
i. A and C and D and F
h. A and C and D
You might also like to view...
What command line utility can be used to repair the BCD on a Windows installation?
A. chkdsk B. fsutil C. dfrgl D. bootrec
If you are contacting someone who does not have a Skype account, then you are prompted to ________ to join Skype.
a. send a letter b. send a text message c. send an e-mail invitation d. call the individual
What is a honeypot?
A. A honeypot is distributed IDS. B. A honeypot is a server with honey battery cells. C. A honeypot is a fake server or entire network segment with multiple clients and servers. D. A honeypot is a real server or entire network segment with multiple clients and servers.
The _____ key is used to complete the name of a command or filename in the Bash shell.
A. Ctrl B. Tab C. Shift D. Spacebar