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

Discover Class Methods in C++

Object-Oriented Programming is a way to integrate with objects that might contain data (in the form of attributes or properties of objects), and code blocks in the form of procedures (methods, functions of objects). These attributes and methods are variables and functions that belong to the class, they are generally referred to as class members. Do you want to learn how to define a…
Read more
C++C++11C++14C++17Introduction to C++Learn C++

Learn to Use Object Arrays and Object Pointer Arrays in C++

Object-Oriented Programming is a way to integrate with objects which can contain data in the form (attributes or properties of objects), and code blocks in the form of procedures (methods, functions of objects). These attributes and methods are variables and functions that belong to the class, they are generally referred to as class members. In a previous post, we described how…
Read more
C++C++11C++14C++17Learn C++

Learn to Use Constant References in C++ Functions

When we call a function with parameters taken by value, it copies the values to be made. This is a relatively inexpensive operation for fundamental types such as int, float, etc. If the parameter is composed of a large compound type, this may result in a certain overhead. For example, let’s consider this following function to combine name, mid name, and surname. string fullname (string name…
Read more
C++C++11C++14C++17Introduction to C++Learn C++

Learn to Use Parameters in Functions in C++

In the C++ programming language, we can add functions with many parameters, each parameter may have different types. We can add as many parameters as we want by defining its type and its name to be used inside that function separated with ‘,’ coma. We can shape this usage in the most common syntax to define a function as below, return_type function_name ( type1 parameter1, type2 parameter2…
Read more