≡ Menu

C++ Programming

How to Use Friend Modifier in C++ with Example Code

You would consider someone as your friend, if you trust him/her and thereafter you would grant your friend some higher level of privilege. Some might say a friend of your friend is also your friend. But, as we will see that is not that case in C++. In C++, you should exactly state who you [...]


Introduction to C++11 and C++14 with Example Code Snippet

Whether you've been using C++ for a while, or a newbie to programming, you still have to understand the basic details about C++11. C++ programming language is based on C programming, which has been connected to UNIX from it's beginning. Creator of C is Dennis Richie. C++ has added many object oriented features on top [...]


How to use Smart Pointers in C++ with Example Code

In C and C++ programming, pointers are very powerful. As we explained in C pointers example article, pointers are variables that hold address of another variable so that we can do various operations on that variable. Sometimes a programmer can't imagine writing a code without using pointers, whether it is a simple binary search tree [...]


When you start writing your code in C, C++ or any other programming language, your first objective might be to write a program that works. After you accomplished that, the following are few things you should consider to enhance your program. Security of the program Memory consumption Speed of the program (Performance Improvement) This article [...]


To understand fuzzy logic, let us take a very simple example. Imagine a simple light bulb which has two states: light on and light off. We can mark the light off as false, and light on as true. This would be simple system that has two states and is described with George Boole's logic. In [...]


If you are working on any object oriented programming languages (For example, C++), the following are some of the important concepts that you should understand during your learning phase. Out of the following concepts, in this article, you'll learn the basics of Inheritance and Abstract class using a sample C++ code snippet and an explanation [...]


Converting data types from one to another is a most basic aspect for any programmers. First, let us start with the basics. int nNumber; The following are few things to keep in mind for the above line of code: Data type of nNumber is int, which means that we are dealing with number that will [...]


How to use C++ Namespaces with an Example Code

When we talk about namespaces, we should understand certain things about one important operator from the world of C++. That one important C++ Operator is "::" When you confront a C programmer with "::" operator, he might look at it but not understand it. It is one of the things that distinguish the C++ world [...]