A Linked List, composed with structure elements and it is a linear data structure, and each elements are stored at different memory locations. Linked lists are good to add, inserts, subtract, delete each elements from this list. A Simple linked list example is given before in this Learn to Code Simple Linked List in Modern C++ on Windows post.In present post we will explain how to sort two linked…
Sometimes it is needed to understand compilation platform during compile or acting and designing UI elements in accordance with the platform. In this post we would like to give some examples to check some options in application codes. The C++ compiler predefines certain…
Learn C++ With Constructing Generic Algorithms: Principles And Practice By Ben Deane (CPPCon 2020) Video
März 9, 2021
This video explores how to make your own algorithms. Starting with the raw loop that solves a nontrivial problem and turn it into a generic algorithm without removing the ability to perform. It will make you understand algorithm patterns and how to organize the pattern. You…
If you are looking to a way to reliably determine whether C++ code is being compiled in 32 bits or 64 bits there is way to check in C++ codes.
For a cross platform compilation (cross compiler environments like FireMonkey framework in C++ Builder) there is no single reliable method to check if your application is running as a 32bits or 64bits application. Note that lower bits applications (i.e…
Fibonacci Numbers are sequence numbers called the Fibonacci sequence, and in mathematics, it starts with 0 and 1, and then each number is the sum of the two preceding ones. Fibonacci numbers are strongly related to Golden Ratio. In mathematics, two quantities are in…
Helpers for Generic C++ Code Accessing Container Properties
Dezember 12, 2020
In addition to Helpers for Generic C++ Code Iterating Over Sequences the C++17 Standard Library provides the following helpers for writing generic code:
#include <iterator> // new helpers of C++17 are defined here
template<class Container>
void…
Helpers for Generic C++ Code Iterating Over Sequences
Dezember 12, 2020
The iterator library that is part of the C++ Standard Library provides the following helpers for writing generic code:
#include <iterator> // helpers are defined here
template<class Container>
void foo(Container& c)
{
// Generic way to obtain (constant) iterators
auto b = std::begin(c); // (1)
auto cb = std::cbegin(c); // (2)
auto e = std::end(c); //…