Question: Q6: Find 6 errors in the following code and fix them. Member variable count will be used to keep track of number of objects created

 Q6: Find 6 errors in the following code and fix them.

Q6: Find 6 errors in the following code and fix them. Member variable count will be used to keep track of number of objects created for class Test. #include using namespace std; class Test { int x; char yi int count; void Test (int i=0, char b); public: Test (Test A) { x = A.X; y = A.y; count++; } ~Test() { count--; } }; void Test (int i, char b) { X = i; y = b; count++; } int main() { Test X, Y; return 0; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!