C++ is a superset of C. It means that a C++ computer is able to compile any C program but reverse is not true. C programmer can omit functions prototype as they are optional in C programs but it is compulsory to declare function prototype in the C++ program. C++ defines two new operators, new and delete to manage the dynamic memory allocation function which can be used in places of malloc () and free () in C.
Unlike C which requires all the declarations to be made at the beginning of the scope, C++ permits us to make declarations at any point in the program. A new operator:: known as the scope resolution operator has been introduced to access an item that is outside the current scope. It is also used for distinguishing class members and defining class methods. In C++, we have inheritance, encapsulation, object and classes and data abstraction and hiding, polymorphism which are not present in C. In C++, to eliminate the cost of calls to small functions, it supports a concept known as inline functions, which is inserted wherever a call to that function appears. In C, we use goto to jump into a block f code, past a variable declaration and initialization. C++ does not permit goto to skip on initialization.
To find memory leaks in C++ I advise to use Deleaker – http://deleaker.com/