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…
Learn C++ With Functional Error and Optional-value Handling with STX by Basit Ayantunde (CPPCon 2020) Video
February 18, 2021
Error-handling is probably the most divergent part of C++. Many coding guidelines partially allow exception or completely bans, and this leads to many projects supporting multiple error-handling interfaces, such as exceptions, error-prone c-style error-handling, and/or…
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…
Learn C++ With Introducing Microsoft's New Open Source Fuzzing Platform by Michael Walker and Justin Campbell (CPPCon 2020) Video
February 16, 2021
Microsoft is currently fuzzing Windows continuously in Azure using the libfuzzer and the fuzzing tool built by Microsoft Research that we are releasing as Open Source at CPPCon. Developers who continuously create libfuzzer-based test binaries using sanitizers and coverage software can now launch cloud-based fuzzing jobs with a single command line. This video will introduce the framework and…
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;
…
Learn C++ With A Parallel and Heterogeneous Task Programming System Using Modern C++ by Tsung-Wei Huang (CPPCon 2020) Video
February 14, 2021
Taskflow develops a simple and powerful task programming model to allow for efficient implementation of heterogeneous decomposition strategies. This video will cover three aspects: (1) a heterogeneous task programming model using modern C++, (2) an effective work-stealing…
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)
{…
Learn C++ With Practical Memory Pool Based Allocators For Modern C++ by Misha Shalem (CPPCon 2020) Video
February 12, 2021
This talk introduces an approach that uses a combination of a code-based memory allocator implementation and an LLVM-based tool that extracts instrumentation information. There is still considerable value in keeping up with the standard allocator model, as well as in…
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…