Constructors, Destructors and Inline Function in C++

Constructors:- Constructor is a user defined function whose name is same as the class name. Constructor is called as a user defined function, because, a programmer can provide its own constructor with its own functionality. Constructor is a first function which is called implicitly in the objects lifetime. In the constructor , memory is not allocated for the object but constructor is responsible for following things, 1)    It is responsible for initializing memory allocated for that object. 2)    Constructor is responsible for setting appropriate environment for a class. 3)    If our class contains…Read more

Function Overloading (C++)

Function Overloading:-   Function overloading is compile time polymorphism. Appropriate function call is resolved at compile time only. This means writing a function with a same name but with the different definations. There are some rules to write a n overloaded functions. Functions are overloaded on to the basis of number of parameters and type of parameters. C++ compilers differentiate the overloaded function by using naming decoration or name mangling. We can also overload constructor but not destructor. We can not overload a function depend on its return type value because at the…Read more

Mobile Device Management

At the starting this proposition work called COMMONS that was to discover the regular portable framework for versatility answer for the Bus of ABB. The 37 cross stage advances were explored to check whether they have the capacity to improve a portable system that can run on distinctive unit stages, for example ipad, Android apparatuses and Windows Phone. There are numerous profits furnished by cross-stage instruments (CPT): low incremental expenses and large amounts of code reuse, brief time-to-market, expanded generally application quality. Utilizing Cpts let the designers address numerous stages. The designers in…Read more

Classes in C++

Class:- Class is a collection of a characteristics and a behaviors. Characteristics means data members defined in the class and behaviors means a member functions/methods which are defined in the class and this methods are applied on to the characteristics of the class. e.g. class demo { public: int i,j; void fun() { cout<<”Inside the fun of demo”; cout<<i; cout<<j; } }; In the above example, demo is our class which contains two characteristics as I and j. and both are integers. Behaviors of the demo class is a function fun() which applied…Read more

Pure Virtual Function & Abstract Base Class

If we want to provide only interface for the derived class then we use the concept of abstract base class. If we create abstract base class then we can not create object of that base class. Writing pure virtual function means writing (=0) at the end of a prototype of a function without any defination. When we write at least a single pure virtual function inside the class then that class is considered as a abstract base class. A class having pure virtual function only says what to do does not say how…Read more

Reference Variables in C++

This concept is used in C++. When we create a variable of any data type, we use single identifier to identify that variable. Example:    int i; In this case, i is an identifier from which we can access that variable. If we want to assign some another name to that same identifier then we can use the reference variable concept from C++. A reference variable are such a variable which are refering to already created datatypes. A reference variables are the names given to the variable. Entry of that another name is…Read more

Pointers : In Simple Terms

Before starting a pointer first clear basic concepts of a variable. A variable is nothing but a name given to a storage area that our program can manipulate. Each variable in the C has a specific type which determines a size and the layout of the variable's memory; the range of values that can be stored within that memory; and the set of operations that can be applied to the variable. When we declare a variable like int no = 21; Then it does get 4 bytes of memory and inside that memory…Read more

Static Members and Static Concept

The static concept in C and C++ is different. When we create the static variable in the C its scope is limited means inside its .obj file only. But in the C++ when we create the static member its single copy can be shared between all the objects of the class. Memory allocated for the static members is on the .bss or non bss section. We can initialize the static members inside the constructor like the non static members, or we can initialize it after the class definition like int demo::i=10; Value for…Read more

Virtual Functions in C++

Important points about Polymorphism and Virtual Function   Polymorphism is the third important feature in C++ after data abstraction and inheritance. Polymorphism means single name and multiple meaning. There are two types of polymorphism like compile time polymorphism and run time polymorphism. We can achieve compile time polymorphism using the function and operator overloading. We can achieve run time polymorphism using the virtual functions. In case of function overloading we can write the multiple function having same name inside a single class. And when we call that function the call is bind with…Read more

Creativity in Designing

Numerous individuals make their sites and weblog with real substance. In each 5 seconds there are more than two sites are started on the Internet. In any case suppose it is possible that you have made a site (weblog) and you are not getting sufficient activity to your site. A site without any web movement is only a waste of time.   Numerous blogger spot the real substance on their online journals, however they still don't get listed in internet searcher and absence of web traffic. I am set to impart how to…Read more