From C to C++ - different paradigms
January 30, 2025, by Slobodan Dmitrovic
C and C++ are two different programming paradigms, two different ways of thinking. In C, we use:
- Raw arrays
- Raw pointers
- Macros
- Pointer arithmetic
- Character arrays
In C++, we should avoid the above entities and techniques. In C++, we use:
- Smart pointers
- Standard Library containers
- Classes and templates
- Strings
- C++-specific idioms and techniques, for example - RAII
When moving from C to C++, we should adopt the following approach:
- Try not to mix C with C++
- Try not to write "C with Classes"
- Try to adopt a new, C++-specific way of thinking

We also have a dedicated training course called "C++ for C Developers." For more info, contact us at contact@cppsrc.com.
Download the Brochure