C++C++11C++14C++17Introduction to C++Learn C++

How To Get A Substring Of A String In A C++ App

How can I use substr() method of std::wstring? How can I get a substring of a string in a C++ app? Here are the answers with C++ examples. Generally, as an introduction to C++, in addition to int, float, double there is another data type called string that we use for alphanumeric variables. In C++ there are several typedefs for common character types are provided: String types are defined in…
Read more
C++C++11C++14C++17Introduction to C++Learn C++

What Is An Eligible Copy Constructor In C++ Software?

Do you want to learn what is Eligible Copy Constructor or what kind of methods are available to declare and use an Eligible Copy Constructor? In this post, we will try to explain the Eligible Copy Constructor with examples. First, let’s remind ourselves of the Constructor and Copy Constructor meaning in C+++ software. What is a Constructor in C++ software? The Constructor in C++ is a…
Read more
C++C++11C++14C++17Introduction to C++Learn C++

What You Need To Learn About Using Bits In C++ Software

How can we print numbers in binary form? How can we set a bit in an integer? How we can set, clear, or toggle bits (binary digits) of a number? How can we change the nth bit of a number? In this post, we will answer these questions and use them in our own C++ software. First let’s remind ourselves where bits come from. A brief background to CPU architecture The construction, size…
Read more
C++C++11C++14C++17Introduction to C++Learn C++

Learn to Use Date and Its Properties in Your C++ App

How can we use Date in a C++ App? In programming we have two important parameters that we frequently use – the Date and Time properties. The Date and Time property is obtained from a timer or time module which is a physical device on the hardware you are using. For example, a real-time clock (RTC) DS3231 module is used to count and ‘remember’ the correct time on IoTs. Other…
Read more