any


1. Type Erasure:

#include <typeinfo>

struct Base {
  virtual std::string type() const = 0;
};

struct Derived1 : Base {
  std::string type() const override { return "Derived1"; }
};

struct Derived2 : Base {
  std::string type() const override { return "Derived2"; }
};

int main() {
  std::vector<Base*> objects;
  objects.push_back(new Derived1());
  objects.push_back(new Derived2());

  for (auto& obj : objects) {
    std::cout << obj->type() << std::endl;
  }

  return 0;
}

2. Function Overloading:

3. Default Function Parameters:

4. Variadic Templates:

5. Lambda Expressions:

6. Auto Keyword:

7. Range-Based For Loops:

8. Structured Bindings:

9. Constexpr Functions:

10. Template Specialization:

11. Static Assertions:

12. Inline Namespace:

13. Move Constructors and Move Assignment Operators:

14. Virtual Functions:

15. Abstract Classes:

16. Encapsulation:

17. Inheritance:

18. Polymorphism:

19. Exception Handling:

20. Templates:

21. Iterators:

22. STL Algorithms:

23. STL Containers:

24. Function Pointers:

25. Smart Pointers:

26. Lambda Expressions with Captures:

27. Rvalue References:

28. Perfect Forwarding:

29. Type Aliases:

30. Enum Classes:

31. Bit Manipulation:

32. Using Directive:

33. Conditional Operator (Ternary Operator):

**34. Range-Based For Loop with Ind

Last updated