
Modern C++ for C Programmers - ausjke
https://ds9a.nl/articles/posts/cpp-intro/
======
bhargav_
I really like this list as it seems to cover the core aspects of what makes
C++ a good language. But the one issue I have with resource such as these, is
the lack of covering how to build real work projects. The list itself seems
really good and after giving the topics a light skim, I really want to dive
right into it and read everything.

But the biggest thing that I struggled with (and still have no idea about)
when learning C++ was trying to learn how to build real projects. This
includes things like, how do you use an external library? How do you set up a
build system? Which build system to use in the first place? The last time I
was trying to learn C++ (about two years ago I think?) I couldn't find answers
to these questions, which was pretty discouraging as I thought C++ was a
really useful language to learn. I wish this article covered some of these
topics for beginners looking to build something more than a simple program.

~~~
cozzyd
If you're on a Linux system, learn how to use Makefiles for building since
they're generally useful for lots of things. Cmake is becoming more common and
does some good things, but I find it very hard to use/debug (and you might
find yourself debugging the Makefiles it generates anyway). It helps if you
already know how to compile/link C programs...

How to incorporate external libraries depends on if they're header-only,
shared libraries, or static libraries (do people still use static libraries?).
pkg-config is your friend!

~~~
pjmlp
Most embedded systems do not support dynamic linking.

Plus unless you are doing plugins, dynamic linking is an attack vector.

~~~
cozzyd
Fair enough! Although the tooling for embedded systems is usually some crazy
black art! (I only have experience with mbed and energia systems).

------
ncmncm
Not a bad list.

------
ausjke
the code snippets used have c++17 and c++20 features, my clion only supports
up to c++14 with very limited c++17 support, not to mention c++20.

clang++ does have good c++17 support but g++ only supports full set of c++14

~~~
ncmncm
Which g++ are you talking about? g++-8 defaults to C++17. g++-9 supports many
C++20 features.

~~~
ausjke
using default g++7 on ubuntu 18.04, but you're correct that 8/9 has
c++17/c++2a support, i need upgrade my toolchain now

------
29athrowaway
If you are not already using C++, learn Rust instead.

~~~
setr
Coincidentally, the author already has a response for you:
[https://ds9a.nl/articles/posts/cpp-rust-
go/](https://ds9a.nl/articles/posts/cpp-rust-go/)

~~~
pcwalton
This post makes the mistake of assuming that anybody in industry writes secure
C or C++ code.

