C++ Core Guidelines: Iostreams

When you interact with the outside world, the iostream library is the way to go in C++. As always you have to keep a few rules in mind. Let me show, which rules.

Read more
Add CommentViews: 711

C++ Core Guidelines: Rules for Strings

The C++ core guidelines use the term string as a sequence of characters. Consequently, the guidelines are about  C-strings, C++-strings, the C++17 std::string_view's, and std::byte's. 

Read more
Add CommentViews: 2039

C++ Core Guidelines: Avoid Bounds Errors

When you access an element outside a container of the STL, the result is not so promising. You effect may be an error or undefined behaviour. Undefined behaviour means all bets are open.

Read more
Add CommentViews: 5826

More special Friends with std::map and std::unordered_map

Modern C++ has eight associative containers, but your special friends should be std::map and std::unordered_map. Why? Let me explain it in this post.

Read more
Add CommentViews: 4344

C++ Core Guidelines: std::array and std::vector are your Friends

In 99 % of your use-cases for a sequential container, you are totally fine with a std::array or a std::vector. What? If you don't believe me, read this post.

Read more
Add CommentViews: 14968

C++ Core Guidelines: The Standard Library

The rules to the C++ standard library are mainly about containers, strings, and iostreams.

Read more
Add CommentViews: 7632

C++ Core Guidelines: The Remaining Rules to Source Files

Today, I complete the rules of the C++ core guidelines to source files. They are about header files and namespaces.

Read more
Add CommentViews: 4843

C++ Core Guidelines: Source Files

The organisation of source files is a topic which is quite seldom addressed in C++. With C++20 we will get modules, but until then we should distinguish between the implementation and the interface of our code.

Read more
Comments 2Views: 5665

C++ Core Guidelines: Mixing C with C++

Due to the same history of C and C++, both languages are closely related. Because neither of them is a subset of the other, you have to know a few rules to mix them.

Read more
Tags: C
Add CommentViews: 8238

Subscribe to the newsletter (+ pdf bundle)

Blog archive

Source Code

Visitors

Today 3327

All 2069580

Currently are 129 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments