Firstly I created a class (here, I created a class named Student) Then I created two public data members or instance variable. After that I created an object of Student class and named it s1 just for simplicity. Then I am assigning values to the object, this step is called initialization and finally I am printing values of s1 object. https://code.sololearn.com/cSxO6FcEJVoM/?ref=app You can learn about this topic from here: https://www.javatpoint.com/cpp-object-and-class
13th Jan 2022, 10:50 AM
Arfi Hussain
Arfi Hussain - avatar