C++ Language, OOP & STL Master Manual

Complete Unabridged Theory, Line-by-Line Code Explanations, Object-Oriented Principles & Standard Template Library Reference

Chapter 1: C++ Architecture & Stream I/O

🇬🇧 English Definition

C++ is a compiled, multi-paradigm language created by Bjarne Stroustrup that combines C-level performance with Object-Oriented abstractions.

🇮🇳 Hinglish Definition

C++ C language ka advanced Object-Oriented version hai jo High-Level Design (Classes) aur Low-Level Speed dono ek sath deta hai.

💻 Modern C++ Console Program
using namespace std;

int main() {
    cout << "Welcome to C++ Master Manual by Instructor" << endl;
    return 0;
}
📤 Compiled Output:
Welcome to C++ Master Manual by Instructor

Chapter 4: Object-Oriented Programming (OOP) Classes

🇬🇧 English Definition

Classes serve as blueprints for creating objects, encapsulating private member variables and public member methods.

🇮🇳 Hinglish Definition

Class ek custom data blueprint hota hai jo attributes (variables) aur behaviors (methods) ko ek sath wrap karta hai.

💻 Class & Getter/Setter Example
class Car {
private:
    string brand;
public:
    void setBrand(string b) { brand = b; }
    string getBrand() { return brand; }
};

int main() {
    Car c1;
    c1.setBrand("Tesla Model S");
    cout << "Car Brand: " << c1.getBrand() << endl;
    return 0;
}
📤 Compiled Output:
Car Brand: Tesla Model S

Chapter 8: C++ Standard Template Library (STL) Vectors

🇬🇧 English Definition

std::vector is a sequence container in C++ STL representing a dynamic array that automatically resizes when items are added.

🇮🇳 Hinglish Definition

std::vector C++ STL ka dynamic array hota hai jiska size data aane par automatically expand ho jata hai.

💻 STL Vector Push & Loop Example
int main() {
    vector v = {10, 20, 30};
    v.push_back(40);
    cout << "Vector Size: " << v.size() << endl;
    return 0;
}
📤 Compiled Output:
Vector Size: 4