C++ Programming Tutorials

C++ Programming Tutorials And Articles
  Title / Author Replies
We recently saw a tutorial on Vectors in C++. Now its time for better things. So we all know what a set is. It is a group of elements in which there is no duplicate. Consider we need a container with following features: -> add an element, but do not allow duplicates -> remove elements -> get...
I thought of adding this small code snippets to thelibrary which just reverses the content of the array. Not sort in ascending/descending order, but put last array entry to first, etc. EG.. if array consists of {2,3,4,7,12,98},, need to output {98, 12,7,4,3,2} #include <iostream.h> #define...
Templates, which are sometimes called parameterized types, are mechanisms for generating functions and classes based on type parameters. By using templates, you can design a single class or function that operates on data of many types, instead of having to create a separate class for each type. ...
Introduction This article discusses about the Two Dimensional To Three Dimensional conversion and vice versa in c++ The following program converts two dimensional array to three dimensional array using TwoDimToThree() and converts three dimensional array to two dimensional array ussing...
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 +...
Many of us might have wondered at sometime or the other about how to pass a variable number of arguments to C++ functions : something like a printf function. I don't know how many are aware of this, so I decided to post an article on this topic. Background When a function is declared, the...
Introduction This article talks about all different usage of const qualifier in C++. Background Declaration: Named constant or const variables
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 Multi-Dimensional Arrays in C/C++. About 1-Dimensional Array see All about Arrays in C/C++ - Part I Background Multi-Dimensional Arrays Multi-dimensional arrays are nothing but Array of Arrays.
Introduction This article talks about References in C++ with some examples. Background Reference: A Reference is nothing but an Alias to an existing variable.
Abstract In this article, Anatoliy Kuznetsov answers the questions and tells us about the open BitMagic C++ Library. Introduction While regularly looking through the Internet-resources related to the sphere of 64-bit programming, I often came across mentioning about BitMagic C++ Library...
Constructors are functions with the same name as the class. They are used to create the instance of a class. They are provided default by the compiler. But still user can have his/her own constructor declared. We can have a constrctor with a single parameter and use this kind of constructor for...
Inheritance is a feature in object-oriented programming which is very similar to the way we inherit characteristics from our parents. Characteristics in object-oriented programming terms are attributes and behaviors of a class—that is, the data and methods of a class. Inheritance is a...
Original Non English Version here. For simple applications, it's enough just to rely on automatic memory management through local variables. But once the data become larger, it is no longer imperative to request memory from the heap and manage. Content Function Families Allocators ...
Complete Binary tree program done in C++ including Inorder, Preorder and Postorder Traversal. #include <iostream.h> #include <stdlib.h> enum {TRUE = 1,FALSE = 0}; typedef struct _node {
Finds INTEGRAL of f(x) by Trapezoidal and Simpson method Simultaneously TRAPEZOIDAL RULE :- Integral of F(x) in between the limits a and b is given by =(h/2)*(y+2(y+y+y+..y)+y) where y=F(x), x=x+h, h=(b-a)/n.
Find roots of any linear algebraic nth order equation by Regula Falsi method The Code #include <stdio.h> #include <conio.h> #include <math.h> #define ACC 0.00001 #define N 10
We have all been using screensaver's since the time we first entered the world of computers. Everyone of us must have thought how one can make a screensaver of his/her own. Screensavers were originally meant to prevent damage to phosphorus coated computer screens. Now they are mostly used for...
We have all read about C++ Standard Template Library. It provides generic code for data types. Like vectors, pairs, list, sets, maps, etc. Today we'll take a good look into Vectors. VECTOR We have all been using arrays to store elements. But you must have thought at one point or another,...
Programmers, meet a new tool to search for errors in source code of software written in C/C++. Within the scope of the PVS-Studio analyzer, we implemented a new set of general-purpose rules. This functionality is free for now. You may download PVS-Studio here...