Home
C++95
Cancel

Story of Alexander Stepanov, the author of STL 🔆

An example: for modern children, smartphones have always existed, push-button phones are something ancient, and wired phones are just an attribute from films about the cold war. Likewise, for prog...

std::vector, but 20% cooler

It is often required to work on a group of objects, to somehow sort them, to find the object by a key, and so on - depending on the business logic. Let’s say we have objects of Meal type🍝, then yo...

📚 Book review: "C++20: Get the Details" (2021)

Link to Amazon. The C++11 standard was a revolution in the language. It made C++ a new language. The C++20 standard is the most influental standard since C++11, it has a ton of new features. T...

Is it possible to call main() recursively?

(Some useless info, I guess) Long time ago I was reading “questions for C++ interview” and met this question: “it is possible to call the main() function from the program, that is, recursively?” ...

Your own compiler - do it yourself ⚙️🛠

In my opinion, there is the best tutorial to make your own programming language compiler (in C++): My First Language Frontend. The theory and practice of writing compilers is a whole world, which ...

Wrapper for output streams 🌊

Every big tech company (like FAANG) has its own implementation of std::string and/or a string utils library. All over in the code, if you want to send a slightly changed string to the output strea...

Practical linkage types 🔗

The standard way to define a functions is as follows: one writes the declaration in an .h-file (so that many translation units get aware of its existence) and the definition in a .cpp-file. To ful...

Two-faced "inline" for function

So it happened that C++ has the inline keyword, which being applied to functions gives them two orthogonal perks. The one perk appeared because of the other perk, but they’re independent otherwise....

Redundant "const" harms performance ⏱

The correct using of const is a big topic in C++. The coolest explanation of this topic is probably there: Const Correctness, C++ FAQ, but it doesn’t tell about one disadvantage of the “redundant” ...

Martian Horrors 👽

As a programmer, I often deal with “air castles”: I write code that works with very abstract concepts. Suddenly I came across a video, where they analyze source code of software for NASA rovers (n...