C++ Programming Tutorials

C++ Programming Tutorials And Articles
  Title / Author Reverse Sort Order Replies
Abstract Introduction Logical errors Missing /openmp Missing parallel Missing omp Missing for Unnecessary parallelization Incorrect usage of ordered Redefining the number of threads in a parallel section
Insertion Sort like Bubble Sort & Selection Sort also uses the Array data structure. So let's see about the insertion sort, again a not-so-good sorting with some of uses of its kind and move onto a whole new brand of algorithms. Insertion Sort Like most of the sorting algorithms, this too has...
I thought of starting the whole algorithm series with the most popular Sorting algorithms. Sorting as you know is a way to order a list or a sequence or elements. ex: Arranging set of marks to ascending order Arranging names to alphabetical order Why learn Sorting when sort() is readily...
From the Bubble sort it was obvious that the sorting isn't efficient for larger list, even for a list more than 100 numbers . So there's another lot of sorting algorithms out there and this is just one of them Selection Sort Once you see the way Selection sort works, you'll wonder why one...
Had to have some days break off . So, lets move on, this time a little than practicals, but again these are more than important in solving the problems in the real world. As I said that will explain more about the different types of the data structures while we move on, here I'll explain 3 of the...
C++ is by Bjarne Stroustrup in 1979. It was created as an enhancement to the C language. It is a combination of higher and low level programming language. It is a superset of the C language. It is case sensitive and provides support to generic and procedural programming concepts. Object oriented...
For learning the C++ programming, user needs the right development environment. The environment can be set up on various operating systems. In this article, we shall explore the local environment setup and installation on different operating systems. In order to set up a development environment...
Different components of C++ programming The various essential components used in C++ programming are as explained below: Class: The class is a template used for demonstrating the behavior supported by the object Object: The object in C++ consists of states and behaviors. An object is an...
Introduction This article talks about Handle-Body pattern and it's uses. Background Though, C++ provides private and public access specifiers to differntiate implementation and interface parts of a class, down the line any changes to the private data or member functions implementation...
Talks about what is function hiding and reason behind it. Background In the example given below you would notice that the func() method has different signatures in the base and derived class. Thus its neither a case of function over-riding (which needs same function signature in base and...
Introduction This article talks a little bit about Smart Pointer conepts and then move on to Reference Counting. Then there is a smaple code to implement the same. Background Smart pointer or auto-pointer is a simple wrapper around a regular pointer, provides all meaningful operations to...
Introduction This article talks about Function Object and it's uses over Function Pointers Background A Function Object, is an Object of a class that defines an operator () and can be called as a function. When a function object is used as a function, the function call operator() is...
Introduction This article talks about how virtual table or vtable and _vptr works, with a pictorial representation. Background Virtual Table is a lookup table of function pointers used to dynamically bind the virtual functions to objects at runtime. It is not intended to be used directly...
Introduction This article talks about how Virtual table and _vptr looks in case of simple Multiple Inheritance Background In Multiple Inheritance, the Derived class contains the _vptr of all it's Base classes. Lets see the below example, where-in, derived class i.e. Derive is derived...
Introduction This article talks about size of a class with all possible scenarios like having simple data (with and without structure padding), virtual functions, Replicated and Shared Multiple Inheritance etc. Background Size of a class object is nothing but it's non-static member data +...
Introduction This article talks about Virtual Table and _vptr in Replicated Multiple Inheritance and in Virtual Base Class (or Shared Multiple Inheritance). Here it is explained using an example: In this example, we have Base1, Base2, Base3 and Derive classes, where Base2 and Base3 classes...
This article talks about Association, Aggregation and Composition Relationships between classes with some C++ examples. Background Association is a simple structural connection or channel between classes and is a relationship where all objects have their own lifecycle and there is no owner. ...
Introduction This article talks about ASSERTs usage and customizing our own ASSERTs. Background Asserts are to catch implementation errors. The developer can document all the assumptions made on the his/her program, by using ASSERTs. If you have used asserts in your code and if it...
Introduction This article tries to cover all about Arrays like from it's definition till it's usage using a single dimension. Background Definition An array is a built-in Data Structure that holds a sequence of variables of same data type, that are stored in a contiguous memory...
Introduction This article talks about Initialization List in C++. Background Definition: Initialization List is another or a better approach for initializing the member variables (and base class objects) of a class upon construction of an instance of it's own.