C++ Classes and Objects

Supporting Object Oriented Programming (OOP) was one of the main reasons C++ was originally created as an extension of C. Object Oriented Programming is a software design paradigm around the objects and classes. Objects are the instances of classes. Classes are kind of blueprints for the objects that define what type of data or functionality … Continue reading “C++ Classes and Objects”

C++ | Binding a Member Function

In this article, we saw how to bind a function with parameters and placeholders and some of its benefits. There we used a normal function. Here will see how to bind member function of a class. Binding a Static Member Function Binding a static member function is just like binding a normal function. The func() … Continue reading “C++ | Binding a Member Function”

C++ | std::bind(), the forwarding call wrapper

C++11 introduced the std::bind() to create a forwarding call wrapper for a function associated argument values. We can bind a function with its parameters to get a callable object. We can call that object anytime later. In fact, calling that callable object and the actual function with the bound parameters are the same. Let’s take … Continue reading “C++ | std::bind(), the forwarding call wrapper”

C++ | Two Dimensional Vector

Two dimensional vector (or 2D vector) in C++ represents a table like structure that has two dimensions, row and column. It is, in fact, a standard STL vector of type vector. Vectors can be nested up to any depth. Here we’ll use two level nesting for two dimensions. Initialization We can initialize the values of … Continue reading “C++ | Two Dimensional Vector”

C++ | Vector, the Dynamic Array

C++ Standard Template Library (STL) provides the data structure, Vector, that represents a dynamic array internally. As the vector is a template class, it can represent an array of virtually any data type. Here we’ll see how the Vector can represent an integer array. The vector data structure has many advantages over a traditional array. … Continue reading “C++ | Vector, the Dynamic Array”

0
0
0
3
0
0