C++C++17Introduction to C++Learn C++

This Is How Trivial Copy Constructors Work In A C++ App

Do you want to learn how trivial copy constructors work in a C++ app? Do you need to know what trivial constructors are? Should we declare a trivial copy constructor in a Class in C++ or not? Let’s start with refreshing our memories on constructors and copy constructor, What is a C++ constructor? The Constructor in C++ is a function, a method in the class, but it is a ‘special…
Read more
C++C++11C++14C++17Introduction to C++Learn C++

How To Make A Comparison Between Strings In A C++ App

How can I use the compare() method of std::string in a C++ app? How can we use C++ to compare strings? Here are the answers with C++ examples. 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 header <string>. strings are…
Read more
C++C++11C++14C++17Introduction to C++Learn C++

What You Need To Know About Virtual Destructors In C++ Apps

Destructors are not only used in classes but also used with struct and union data types. When you construct an object, sometimes you need operations to deconstruct. Do you want to learn what is Virtual Destructor or what kind of methods we have that we can declare and use a virtual destructor? In this post, we will try to explain how to use Virtual Destructor in your C++ apps. What is a C++…
Read more