# Modern C++ for C programmers: part 2

DevFeed: [Modern C++ for C programmers: part 2](<https://devfeed.tech/articles/modern-c-for-c-programmers-part-2-36323.md>)

Original publisher: [Read original article](<https://berthub.eu/articles/posts/cpp-2/>)

Published: 2018-06-14T18:26:28Z

Content type: tutorial

Language: en

Sources: [Bert Hubert's writings](<https://devfeed.tech/sources/bert-hubert-s-writings.md>)

Topics: [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [C](<https://devfeed.tech/topics/c.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [function](<https://devfeed.tech/tags/function.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [programming](<https://devfeed.tech/tags/programming.md>), [programming-language](<https://devfeed.tech/tags/programming-language.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>)

## AI overview

Part 2 of a tutorial for C programmers introduces C++ namespaces and classes, explaining how they relate to existing C code, functions, structs, APIs, and libraries. It also previews inheritance and virtual functions for a later part.

## Source excerpt

Welcome back! In part 1 I discussed how std::string and std::vector interoperate with C, including with the C standard library qsort call. We also discovered that the C++ std::sort is 40% faster than C qsort because C++ is able to inline the comparison function. In this part we continue with further C++ features that you can use to spice up your code 'line by line', without immediately having to use all 1400 pages of 'The C++ Programming Language'.