C++ Programming Tutorials

C++ Programming Tutorials And Articles
  Title / Author Replies
A Simple program for implementing Linked Stack #include<stdio.h> #include<stdlib.h> #include<conio.h> struct node { int data;
Introduction A C++ class with lots and lots of comment on each line for you to understand what each line does and how the program flow works. The Code #include <iostream> // Included for cout
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
Abstract The article will familiarize application developers with tasks given them by the mass introduction of 64-bit multi-core processors symbolizing revolutionary increase of computing power available for an average user. It will also touch upon the problems of effective use of hardware...
Another method for printing the date from starting to ending This method is useful if u r dealing with dates.If u want to do some operation using the date and then fetch another date and do vice versa it is useful. #include<iostream> #include<malloc.h> using namespace std; int ...
Printing the date from starting date to ending date The program takes the starting date and ending date as inputs and prints the dates in between them.This program is useful if u r dealing with dates. The code I have used four date functions i.e date1() , date2() , date3() , date4(). When...
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...
This is just for a kind of information. Here I am going to explain how to make a class so that user can create object of it on free List( heap memory) or Stack. Example 1: Object should be created Only On Heap memory.Idea is that make constructor as private so that no one create on stack....
Generics are parameterized types supported by the common language runtime. A parameterized type is a type that is defined with an unknown type parameter that is specified when the generic is used. C++ supports templates and both templates and generics support parameterized types to create typed...
This article is to explain in brief how Visual C++ is handling exceptions Abnormal situations should be handled by throwing and catching exceptions. Such situations are not the same as normal error conditions, such as a function executing correctly, but returning a result code indicating an...
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 Memory allocation for objects is a tough issue, sometimes. Dynamically allocated memory has to be treated specially when one object is used to initialize another. In default constructor a bit wise copy is done when one object is assigned to another, leaving no room for separate...
Polymorphism is in short the ability to call different functions by just using one type of function call. It is a lot useful since it can group classes and their functions together. It is the most important part of Object-Oriented Programming. Polymorphism is the core of object-oriented programming...
When exceptions occur, the programmer has to decide a strategy according to which he would handle the exceptions. The strategies could be, displaying the error messages on the screen, or displaying a dialog box in case of a GUI environment, or requesting the user to supply better or simply...
Introduction Variables are seen as memory cells that can be accessed using their identifiers. This way we did not have to care about the physical location of our data within memory, we simply used its identifier whenever we wanted to refer to our variable. The memory of your computer can be...
Three major concepts of C++ are Classes, Polymorphism, Inheritance.Let us discuss them in details. Classes A class is the implementation of an abstract data type. It defines attributes and methods which implement the data structure and operations of the abstract data type, respectively....
Introduction To Binary Trees A binary tree is made of nodes, where each node contains a "left" pointer, a "right" pointer, and a data element. The "root" pointer points to the topmost node in the tree. The left and right pointers recursively point to smaller "subtrees" on either side. A null...
There are three techniques used to pass variables into a C or C++ functions. Pass by value C/C++ Pass a pointer by value C/C++ Pass by reference C++ only Pass by value The function receives a copy of the variable. This local copy has scope, that is, exists only within the function....
You can add words to be highlighted in the IDE of Visual Studio 6, 2003 and 2005. Steps (From MSDN) In the same directory as msdev.exe (for Visual Studio .Net search for ...\Microsoft Visual Studio.NET\Common7\IDE\devenv.exe), use the Text editor or Windows Notepad to create a text-only...
One benefit of C++ over C is its exception handling system. An exception is a situation in which a program has an unexpected circumstance that the section of code containing the problem is not explicitly designed to handle. In C++, exception handling is useful bcause it makes it easy to separate...