Ooops Vansh Notes Ipu University
Ooops Vansh Notes Ipu University
due to its modularity, reusability, and ease of maintenance. Here are some
common applications:
Constructor vs destructor
Constructor :
6. Return Type: Constructors do not have a return type, not even void.
Destructor
2. Name: The destructor has the same name as the class, but with a
tilde (~) prefix.
3. Invocation: It is automatically called when an object goes out of
scope or is explicitly deleted.
6. Return Type: Destructors do not have a return type, not even void.
ACCESS SPECIFIERS
GENERIC PROGRAMMING
VECTORS
vector in oops
The STL provides a rich set of tools that make it easier to write
efficient and reusable code. It is a fundamental part of modern
C++ programming.
Supports
inheritance, but this
Inheritance Supports inheritance.
is rarely used in
structures.
Encapsulation is more
Encapsulation is less
common and aligns
Encapsulation common in
with object-oriented
structures.
principles.
Structures are
Supported only in C++
Compatibility supported in both C
and not in C.
and C++.
1. iostream
2. fstream
3. sstream