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

Learn Default Constructors Of Classes In Modern C++

Classes in C++ are the main building blocks of Object Oriented Programming Tools. They have a special function known as a constructor which is automatically called when an object of a class is created. There is a default constructor type in classes that is called when a class is defined with no arguments, or it is defined with an empty parameter list, or with default arguments provided for every…
Read more
C++C++11Learn C++

What Is Assignment Operator Overloading?

One of the most commonly used features ofC++ software, in common with many programming languages, is the “=” assignment operator. These take the form of copy assignment and move assignment operators. In C++, we can overload the “=” assignment operator by creating a new assignment operator, this is calledassignment operator overloading. In this post, we explain…
Read more
C++C++11C++14C++17C++20Introduction to C++Learn C++Syntax

How To Use Basic Methods Of Wide Strings In C++?

In C++, one of the most used variable types are text strings, also known as alphanumeric variables, and they are really important when storing and retrieving valuable data. It is important to store your data safely in its language and localization. In modern C++, strings are std::basic_string types such as std::string, and std::wstring. In this post, we explain some methods of std::wstring in…
Read more
C++C++17C++20Learn C++NumericsSyntax

How To Compute The Greatest Common Divisor And Least Common Multiple in C++?

The C++ 17 standard brings us a lot of useful methods, templates, numerics, and algorithms. Two of the great numeric functions are std::gcm and std::lcm which are defined in the <numeric> header that computes the greatest common divisor and least common multiple of two integers. In this post, we learn what std::gcm and std::lcm are, and how can we use them in modern C++. What is std::gcm…
Read more