Classes (OOP)
class, public members, constructor, methods and object creation.
Simple enough for a 5-year-old to understand
class and constructor
#include <iostream>#include <string>using namespace std;class Cat {public: string name; Cat(string a) { name = a; } string meow() { return name + ": meow"; }};int main() { Cat k("Tabby"); cout << k.meow() << endl; return 0;}