C++ Programming Tutorial

C++ for Beginners: C++ Call by Reference: Using pointers

(C++ programming Example for Beginners) C++ Call by Reference: Using pointers [With Examples] In this tutorial, we will learn about C++ call by reference to pass pointers as an argument to the function with the help of examples. In the C++ Functions tutorial, we learned about passing arguments to a function. This method used is called passing …

C++ for Beginners: C++ Pointers and Arrays

(C++ programming Example for Beginners) C++ Pointers and Arrays In this tutorial, we will learn about the relation between arrays and pointers with the help of examples. In C++, Pointers are variables that hold addresses of other variables. Not only can a pointer store the address of a single variable, it can also store the address of …

C++ for Beginners: C++ Operator Overloading

(C++ programming Example for Beginners) C++ Operator Overloading In this tutorial, we will learn about operator overloading with the help of examples. In C++, we can change the way operators work for user-defined types like objects and structures. This is known as operator overloading. For example, Suppose we have created three objects c1, c2 and result from a class named Complex that represents …

C++ for Beginners: C++ Enumeration

(C++ programming Example for Beginners) C++ Enumeration In this article, you will learn to work with enumeration (enum). Also, you will learn where enums are commonly used in C++ programming. An enumeration is a user-defined data type that consists of integral constants. To define an enumeration, keyword enum is used. enum season { spring, summer, autumn, winter …

C++ for Beginners: C++ Pointers to Structure

(C++ programming Example for Beginners) C++ Pointers to Structure In this article, you’ll find relevant examples that will help you to work with pointers to access data within a structure. A pointer variable can be created not only for native types like (int, float, double etc.) but they can also be created for user defined types like structure. If you do …

C++ for Beginners: C++ Structure and Function

(C++ programming Example for Beginners) C++ Structure and Function In this article, you’ll find relevant examples to pass structures as an argument to a function, and use them in your program. Structure variables can be passed to a function and returned in a similar way as normal arguments. Passing structure to function in C++ A structure variable can …