Fibonacci was an Italian mathematician who introduced this subject to European mathematics, but the similar array was mentioned even before his time.
There are two definitions of Fibonacci numbers with slight variation. Both are pretty similar but little different at the same time.
Vector is an important part of a STL (Standard Template Library).
On a very high-level, STL library has lot of containers that are often used, and it has few methods that could be applied on those containers. Basically STL has several ready-to-use common classes that you can use in your C++ programming. We’ll cover STL in detail probably in a separate article.
Before we discuss about Vector, let us start with an array.
Let us assume that we are in the situation where we need to create a function that calculates the absolute value of a number.
When you have a number that is positive, then absolute value of the number is that same number, but if the number is negative, then the absolute value of the number is that number with sign changed.
So, the function, if you work with int data type would be like this:
Once you understand the basics of C++ programming language, it is essential for you to develop your problem solving skills using C++ program. In other words, you should know how to develop your programming logic to solve a given problem.
In this tutorial, we’ll give a simple binary problem, which you should solve by writing a C++ program.
If you are a programmer, you already know that when you apply for a programming job, the interview process is little different than any other technical job interviews.
In this article we will discuss 10 mistakes that you should avoid in a programming interview.
Operator overloading is one of the advanced concepts of C++. It is a feature through which most of the standard operators can be used with class objects.
When you use an expression like ’2 +3′, you know that the answer will be the sum of two integers. This is because the compiler knows how to interpret the + operator when used with integers. But, what if you want to do something like ‘obj1 = obj2 + obj3′ (where all these are objects of same class) ? How + operator should work in this case?
The answer is through Operator Overloading.
In this tutorial, we will explain operator overloading with the help of a working example.
Inheritance is the property by which a class can inherit data members and functions of another class.
In this case, the class which is inherited is known as base class while the class which inherits is known as derived or child class.
In this tutorial let us study the concept of inheritance in C++ programming with an example program.
In C++, base class and derived class is a popular example of a concept that mirrors real life hierarchy.
Apart from that there are several small but really useful concepts that are specially designed to keep the code simple and make life easier for a C++ programmer.
One such concept is C++ virtual functions.
In this tutorial, we will understand virtual functions concept in detail through C++ code examples.