C++C++11C++14C++17Code SnippetLanguage FeatureLearn C++

Quickly Learn How To Use Canvas Drawing In C++ On Windows

In C++ Builder, it is easy to draw images on Bitmaps by using Canvas property and methods to draw, Canvas can be used on both VCL and FMX applications. Canvas provides an abstract drawing space for objects that must render their own images. TCanvas provides properties, events, and methods that assist in creating an image by: Specifying the type of brush, stroke, and font to use.Drawing and…
Read more
C++11C++14C++17Learn C++

The Main Function of a C++ Program

The source code written in C++ must be compiled (i.e. translated to the machine code) by one or another compiler such as Embarcadero RAD Studio C++ compilers before in can be runned. In general, there are two types of the resulting machine code: library and main executable (hereinafter simply executable). This post will briefly cover the later of these two. When an executable produced from a…
Read more
C++11C++14C++17Learn C++

General Loop Statements in Modern C++

Each loop statement in C++ has its loop body which is executed repeatedly until the loop condition expression that yields a loop condition becomes false (otherwise, the loop will run “forever”). The statement continue can be used to interrupt the current iteration and skip the rest of the loop body to immediately check the loop condition before continuing. A whole loop statement can be…
Read more
C++11C++14C++17Learn C++

Switch Statement in Modern C++

The C++ language provides the switch statement which can be used to replace the set of if statements (see If Statements in Modern C++). First of all, let’s define the enum type Traffic_light_color as follows: enum class Traffic_light_color { red, yellow, green…
C++C++11C++14C++17Learn C++

Learn About Bitmap Operations In C++ Builder (FireMonkey)

Bitmap is a standard for reading and writing pixels of images of applications on all platforms (Windows, MacOS, iOS, Android, Linux, …). A Bitmap includes bitmap information and full uncompressed image in pixels. Each pixel of this uncompressed image consists 4 color members called ARGB (Alpha Red Green Blue) and it can be set or shown as 0xAABBCCDD in hexadecimal format.
Read more