@nurulhasan
Explaining the 'how' behind the 'wow' of code.
Nothing here yet.
Nothing here yet.
Sep 29, 2025 · 13 min read · 1️⃣ The Situation You have a base class with virtual functions. You allocate a derived object using a base pointer: class Base { public: virtual void func() { } ~Base() { cout << "Base dtor\n"; } // ❌ Non-virtual }; class Derived : publi...
Join discussionSep 29, 2025 · 17 min read · C++ is a language that supports both compile-time (static) and runtime (dynamic) polymorphism. Understanding how virtual functions work under the hood is crucial for interviews. This article covers everything about vtable, vptr, and object slicing, i...
Join discussionAug 14, 2025 · 3 min read · 1. Introduction C++ STL already provides: std::set → stores unique elements in sorted order, allows logarithmic-time insertion, deletion, and search. std::multiset → allows duplicates, sorted order. std::unordered_set → stores unique elements in n...
Join discussionAug 5, 2025 · 6 min read · ✅ 1. Basic Initialization cppCopyEditlist<int> l = {10, 20, 30}; ✅ 2. Accessing Elements (No [] indexing) cppCopyEditauto it = l.begin(); advance(it, 2); // move to 3rd element cout << *it; // Output: 30 ✅ 3. Modifying Value at Positio...
Join discussion