C++C++11C++14C++17Learn C++

Tutorial: Learn To Sort A Text File On Windows With C++

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; str_list->LoadFromFile(filename); str_list->Sorted = true; str_list->SaveToFile(filename); str_list->Free(); } Sorting…
Read more
C++C++11C++14C++17Language FeatureLearn C++

Tutorial: Easily Learn To Draw Mandelbrot In C++ On Windows

In mathematics, Fractals are a self-similar subset of Euclidean 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 every x,y and…
Read more
C++C++11C++14C++17Code SnippetLearn C++

Learn To Use Powerful Lambda Expressions In C++ On Windows

Lambda Expressions are an expression that returns a function object, it comes with C++11 standards and used C++14, C++17, C++20 standards, it is well explained here. Lambda expressions are widely used in C++, C#, Groovy, Java, Python, Ruby languages too. The Greek letter Lambda (λ) refers to an anonymous function, it means chosen since it is equated with something nameless and expression…
Read more
C++C++11C++14C++17Learn C++

C++ Is 9.4 Times Faster Than Python In Prime Number Test

Calculating prime numbers in a range is another comparison in programming languages. In this article, we compared the speed of codes to find Prime Number functions in C++ and Python 1. Introduction Prime numbers are an interesting area to research. A prime number, it is also called prime shortly, is a natural number (a positive integer) greater than one that is not a product of two…
Read more