C++ Posts

The Toptal Engineering Blog is a hub for in-depth development tutorials and new technology announcements created by professional software engineers in the Toptal network.
Kevin Bloch
Haxe: Cross-platform Development's Best-kept Secret

The modern, cross-platform programming language Haxe is well-known in some circles, yet many developers have never heard of it. Since it first appeared in 2005, it’s been battle-tested by its loyal—if rather quiet—following.

In this article, Toptal Freelance Software Engineer Kevin Bloch explores the Haxe ecosystem and how to transpile some sample code.

Continue reading →
Andrei Smirnov
A Vital Guide to Qmake

Qmake is a build system tool shipped with Qt library that simplifies the build process across different platforms.

In this guide, Freelance Qt Developer Andrei Smirnov describes the most useful qmake features and provides real-world examples for each of them.

Continue reading →
Daniel Angel Muñoz Trejo
How C++ Works: Understanding Compilation

Compilation and linking are two very fundamental processes that happen all the time during C++ software development. However, what happens during these processes? How does the compiler go from your neatly organized source code to a binary file that the machine understands?

In this article, Toptal Freelance Software Engineer Daniel Trejo explains how a C++ compiler works with some of the basic language constructs to answer some common questions that are related to these processes.

Continue reading →
The Toptal Research Team
How to Learn the C and C++ Languages: The Ultimate List

C is often called a middle-level computer language since it combines the elements of high-level languages with the functionalism of assembly language. C allows the manipulation of bits, bytes, and addresses—giving the programmer more control over exactly how the program will behave and a more direct access to the mechanics of the underlying hardware.

C was created, influenced, and field-tested by working programmers. The end result is that C gives the programmer what the programmer wants.

C++ is an enhanced version of the C language. C++ includes everything that is part of C and adds support for object-oriented programming (OOP). In addition, C++ also contains many improvements and features that make it a “better C,” independent of object-oriented programming.

Continue reading →
Bojan Kverh
How to Get Rounded Corner Shapes In C++ Using Bezier Curves and QPainter: A Step by Step Guide

The current trend in graphic design is to use a lot of rounded corners in all sorts of shapes. We can observe this on many web pages, mobile devices, and desktop applications, as rounded corners make the user interface feel smoother and nicer. However, what if we have to generate rounded corners on the fly, and we cannot preload it from an image?

In this article, Toptal Freelance Software Engineer Bojan Kverh guides us in a step-by-step tutorial on how to develop a simple class in C++ that can turn a complex polygon into a shape with rounded corners using Bezier curves and QPainter.

Continue reading →
Peter Goodspeed-Niklaus
Eliminating the Garbage Collector: The RAII Way

Manual memory management is a nightmare that programmers have been inventing ways to avoid since the invention of the compiler. Programming languages with garbage collectors make life easier, but at the cost of performance.

In this article, Toptal engineer Peter Goodspeed-Niklaus gives us a peek into the history of garbage collectors and explains how notions of ownership and borrowing can help eliminate garbage collectors without compromising their safety guarantees.

Continue reading →
Daniel Angel Muñoz Trejo
Optimized Successive Mean Quantization Transform

Image processing algorithms are often very resource intensive due to fact that they process pixels on an image one at a time and often requires multiple passes. Successive Mean Quantization Transform (SMQT) is one such resource intensive algorithm that can process images taken in low-light conditions and reveal details from dark regions of the image.

In this article, Toptal engineer Daniel Angel Munoz Trejo gives us some insight into how the SMQT algorithm works and walks us through a clever optimization technique to make the algorithm a viable option for handheld devices.

Continue reading →