Question: written code in c++ is required only. 1. Define a class Counter having an attribute count capable to store int value. provide following functionalities. The

written code in c++ is required only.
1. Define a class Counter having an attribute count capable to store int value. provide following functionalities. The variable counter should keep the track of no of objects being created. Each object should also be capable to hold its instantiated position. Provide following functions to your class Display Total () // should be capable to display total number of objects MyPos() // should display the number at which a particular object is created Counter a; // should create an object Counter b; a Display Total0; // 2 a.MyPosO://1 b.MyPosO://2 declare appropriate attributes and member functions static and const. Write a driver program that creates multiple objects and then calls the member function to get total number of objects created in memory
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
