Question: Explain the error(s) in this program which tries to count the number of objects instantiated. #include class B { double n: int counter: public: B

Explain the error(s) in this program which tries to count the number of objects instantiated. #include class B { double n: int counter: public: B () { n = 0: counter++: } static int PrintCounter() { return counter: } }: void main () { B x, y, z: cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
