0
Here is question.
Create a class that imitates part of the functionality of the basic data type int. Call the class Int (note different capitalization). The only data in this class is an int variable. Include member functions to initialize an Int to 0, to initialize it to an int value,to display it (it looks just like an int), and to add two Int values. Write a program that exercises this class by creating one uninitialized and two initialized Int values,adding the two initialized values and placing the response in the uninitialized value,and then displaying this result. Code: https://code.sololearn.com/cJDUtBk4Gp9Y/?ref=app
4 ответов
+ 1
Change
a.add(a, b)
To
a.add(10,10);
+ 1
proGAMBLER
No not right
You have created class Int
And created object 'a' so how you can pass as a parameter in add method because add method accept int values not class object.
And what about 'b'? which is not defined.
0
dude just tell me is it right according to statement ?..I know I have to pass integers in parameters