This article explains how to create a simple program in C++ that shows the current CPU usage from command line in Linux. That’s achieved processing the file /proc/stat which contains several kernel/system statistics.
This tutorial is an introduction to Qt programming and will teach you how to create an application with Qt and C++. Full project and source code are provided.
In this post I analyse and discuss the performance of raw pointers vs smart pointers in few C++11 benchmarks. The operations tested are creation, copy, data access and destruction.
If you’re working on some C++ code and you need to sort the elements in a container which provides random access, like a std::vector, the simplest and quickest option is using the function std::sort from the <algorithm> functions. In this post I’m showing…
This post shows the results of several benchmarks I wrote to verify the performance of 3 C++ STL containers: vector, list and deque. The operations tested are insertion at the end of the container, insertion at random positions and removal of elements from…
C++ is a powerful language, but “with great power comes great responsibility” so it’s quite easy to mess things up and to make mistakes that can lead to unexpected results and miserable fails. In this post I’m going to describe…