New Dynamic Memory Allocation
There are just two keywords in C++
- new: dynamic allocation. Syntax:
ptr = new data-type(default value)
for single allocation orptr = new data-type[size]
for array allocation - delete: dynamic de-allocation. Syntax:
delete ptr
for single allocation ordelete[] ptr
for array allocation
Template
STL
Standard Template Library
OOP
Object-Oriented Programming is the most important feature on C++ different from C
Some things outside
Have you ever wonder why C++ have everything C have and more but C is widely used in embedded ?
Because C++ and their library is much larger than C and embedded applications are usually have limited memory, not all hardware can satisfy