C++ Programming Tutorials

C++ Programming Tutorials And Articles
  Title / Author Replies
Views
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...
1
3,545
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...
1
12,185
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...
1
10,741
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...
1
2,976
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....
1
3,303
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...
1
34,507
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....
1
2,621
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...
2
5,489
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...
3
6,118
The size of a class can be changed simply by playing with the order of its members' declaration: struct A { bool a; int b; bool c; }; /*sizeof (A) == 12*/ On my machine, sizeof (A) equals 12. This result might seem surprising because the total size of A's members is only 6...
2
3,297
Memory pools allow dynamic memory allocation comparable to malloc or the Operator new in C++. As those implementations suffer from fragmentation because of variable block sizes, it can be impossible to use them in a real time system due to performance. A more efficient solution is preallocating a...
6
26,014
It's a truly neutral question: given that there are many languages to choose from, why do you choose to program in C++? 1. Compared to many of the other OO languages (i.e. Java, C# etc.), C++ has better support for the functional programming style. 2. Good support for generic programming. ...
20
7,832
Introduction Here is a code in which i have created for the string class. This article tells how we can implement the functions of a string through making it a class. //Header Files # include "classfile.h"
6
3,955
Annotation. The article may be interesting for developers who use or plan to use OpenC++ library (OpenCxx). The author tells about his experience of improving OpenC++ library and modifying the library for solving special tasks. Introduction. Introduction. One may often here in forums that...
4
3,889
The essence of the code analysis library VivaCore. Annotation. The article tells developers about VivaCore library, preconditions of its creation, its possibilities, structure and scope of use. This article was written simultaneously with the development of VivaCore library and that's why some...
2
4,253
This program shows how to create the private constructor in C++. #include<iostream.h> #include<conio.h> class Test { int Data; //Stores the Data
3
10,272
The Input/Output system in C++, holds information about the result of every I/O operation. The current status is kept in an object from type io_state, which is an enumerated type (just like open_mode) that has the following values: godbit -> No errors. eofbit -> End of file has been reached...
2
11,276
Annotation. Though the history of 64-bit systems development makes more than a decade, the appearance of 64-bit version of OS Windows raised new problems in the sphere of development and testing applications. In the article there are considered some mistakes connected with 64-bit C/C++ code...
3
3,501
Problems of testing 64-bit applications. Andrey Karpov Evgeniy Ryzhkov http://www.Viva64.com March 2007 Abstract. The article observes some questions related to testing the 64-bit software. Some difficulties which a developer of resource-intensive 64-bit applications may face and the...
6
3,747
Function pointer - how to declare function pointer in structure and how it call ,see it. #include <stdio.h> #include <string.h> #include <stdlib.h> typedef struct strfunptr { float a; float b;
3
26,549