In C++, STL Standard Template Library has many algorithms for some operations like searching, counting, and manipulation of ranges and their elements. C++17 has a new feature that you can sort vectors with Parallel STL Algorithm. In C++ Builder, Vectors can be used and sorted by Parallel STL Algorithm as below.
#include <vcl.h>
#include <stdio.h>
#include <vector>
#include…
Learn To Code Simple Linked List In Modern C++ On Windows
February 21, 2021
ALinked List, composed of structural elements and it is a linear data structure, and each element is stored at different memory locations. Linked lists are good to add, inserts, subtract, delete each element from this list. Linked lists were popular much in the 80s to…
Learn to Develop a Perseverance Mars Simulation 3D in C++ Builder
February 19, 2021
Do you want to develop your own Mars Simulation with the latestMars Perseverance Rover3D Model orMars Ingenuity Helicopter3D Model? C++ Builder is very easy to develop this kind of simple simulations. You just need a 3D object model and some colors…
Bubble SortMethod is one of the sorting methods which is the simple sorting algorithm that runs by repeatedly swapping the adjacent elements if they are in the wrong order.Bubble sortsometimes referred to assinking sort.
You can use thisbubble_sort()function to sort an integer array in its range as given below.
void bubble_sort(int A[], int n)
{
for ( int…
Tutorial: Learn To Copy Matrix As A Excel Clipboard In Modern C++
February 17, 2021
Clipboardalso called thepaste buffer, is a buffer that operating systems provide to copy things (texts, bitmaps, tables, etc.) for the short term and transfer within and between application programs. The clipboard is usually temporary and unnamed, and its…
Tutorial: Learn To Sort A Text File On Windows With C++
February 15, 2021
In C++ Builder sorting text string lines is very easy by setting Sorted property of a StringList to true. This example below sorts a given text file and saves as sorted in same name.
void sort_textfile(UnicodeString filename)
{
auto str_list = new TStringList;
…
ASCII Art: Fun Code Spinning Donut In 3D Text Form In C++
February 13, 2021
There is no word to say, we would like to share this Amazing 3D Spinning Donut by Andy Sloane . This full post explains what is mathematic behind this. Please visit his awesome post here. There is also another video of his codes by Professor Lex Fridman here. We just made few changes on codes for the C++ Builder Console VCL Application, it runs well as in original.
void rotate_donut_3D(void)
{…
Tutorial: Easily Learn To Use optional In Modern C++ On Windows
February 11, 2021
Optional definition (std::optional) manages anoptionalcontained value, i.e. a value that may or may not be present. This class templatecomes with C++17 standard, it is used with CLANG and other C++ compilers which has this standard. A common use case…
Tutorial: Easily Learn To Draw Mandelbrot In C++ On Windows
February 9, 2021
Inmathematics, Fractalsare a self-similar subset ofEuclidean space whose fractal dimensions strictly exceeds its topological dimension. So when you draw these functions in their topological height, fractals appear the same at different levels, as…
Tutorial: Learn To Print Mandelbrot In Text Form In C++
February 7, 2021
Inmathematics, fractalsare a self-similar subset ofEuclidean space whose fractal dimensions strictly exceeds its topological dimension. So when you draw these functions in their topological height, fractals appear the same at different levels, as illustrated in successive magnifications of the Mandelbrot set. Mandelbrot set is a good example to see how fractals are changing in…