Classes and Objects
What is a Class?
A class is a blueprint for creating objects.
google.com, pub-8434817042454839, DIRECT, f08c47fec0942fa0
What is an Object?
An object is an instance of a class.
Example
#include<iostream>
using namespace std;
using namespace std;
class Student {
public:
string name;
int age;
};
int main() {
Student s1;
s1.name = “Rahul”;
s1.age = 20;
cout << s1.name;
}
Use Case
Used to represent real-world entities

