C++

Template | C++

Introduction Templates are powerful features of C++ which allows you to write generic programs. In simple terms, you can create a single function or a class to work with different data types using templates. The concept of templates can be used in two different ways: Function Templates Class Templates Use [...]

2025-01-02T10:31:26+05:30Categories: Programming|Tags: |

Initializer List | C++

Introduction Initializer list is used to initialize data members. The syntax begins with a colon(:) and then each variable along with its value separated by a comma. The initializer list does not end in a semicolon. Syntax // Initializer syntax ConstructorName(datatype value1, datatype value2):datamember(value1),datamember(value2) { // Other Code } Example [...]

2020-02-02T14:10:52+05:30Categories: Programming|Tags: |

What is Operator Overloading in C++

Definition Operator Overloading is a type of polymorphism in which an operator is overloaded to give user defined meaning to it. Overloaded operator is used to perform operation on user-defined data type. For example '+' operator can be overloaded to perform addition on various data types, like for Integer and [...]

2020-06-06T00:40:02+05:30Categories: Programming|Tags: |

What are Function Pointer in C++

Definition Function pointers point to executable code at a particular piece of memory. Dereferencing the function pointer allows the code in the memory block to be executed. Main benefit of function pointers is that they provide a straightforward mechanism for choosing a function to execute at runtime. Important points about [...]

2024-05-11T16:35:21+05:30Categories: Programming|Tags: , |
Go to Top