Pages

Tuesday, 26 November 2013

Operator Overloading

Operator Overloading in C ++ is coming soon on Learn c++ Online along with sample C++ Programming examples

Friday, 15 November 2013

Simple Function Template


Statement: A function template in C ++ that can calculate
                        larger of the two elements where elements can
                        be of any type (i.e.int, char, float etc)


                  Download .cpp file (Source File) of this code


template <typename dataType>
dataType getLarger(dataType value1, dataType value2)
{

Simple Class Template


Statement: A class template in C ++ which consists of an
                        array that can store elements of any
                        type (i.e.int, char, float etc)





template <class dataType>
class elementsList{
       dataType* _array;
       int size;