C++ function templates with multiple parameters ☰ Procedural Oriented Programming Basic OOPS Concepts Benefits of OOPs C++ History C++ features C++ program structure C++ Installation C++ Comments C++ output operator C++ input operator C++ Header files C++ variables C++ Compiling and linking C++ Exercise C++ Tokens C++ Tokens C++ Identifiers & constants C++ Data types C++ User defined data type C++ derived Data types C++ Symbolic constant C++ Type compatibility C++ Declaration of variable C++ Reference Variables C++ Exercise Operators C++ operators C++ Memory Management operator C++ Manipulators C++ Type Cast Operator C++ Exercise Expressions C++ Expressions C++ Implicit Conversions C++ Exercise Operator overloading C++ Operator Overloading C++ Operator Precedence C++ Exercise Control statements C++ if statements C++ switch statement C++ Do-while statement C++ while statement C++ for statement C++ Exercise C++ functions C++ function introduction C++ function prototyping C++ Call by reference C++ Inline function C++ Default Arguments C++ function overloading C++ Math Library Functions C++ Exercise Class and objects C++ class Introduction C++ Specifying a Class C++ Creating Objects C++ Defining Member Functions C++ Nested OF Member Functions C++ Private Member Functions C++ Memory Allocation for objects C++ Static Data Members C++ Array of objects C++ Friendly functions C++ Returning Objects C++ Pointer to Members C++ Local Classes C++ Exercise Constructor and destructors C++ Constructor Introduction C++ Parameterized Constructor C++ Multiple Constructor C++ Dynamic Initialization of Objects C++ Copy Constructor C++ Dynamic Constructor C++ Destructors C++ Exercise Operator Overloading C++ Operator Overloading C++ Overloading Unary Operators C++ Overloading Binary Operators C++ Overloading Binary Operators Using Friends C++ Manipulation String Using Operators C++ Rules for overloading operators C++ Exercise Type conversions C++ Basic To class Type C++ Class TO Basic Type C++ One class To another class type C++ Exercise Inheritance C++ Inheritance introduction C++ Single Inheritance C++ Multiple InheritanceC++ Multilevel Inheritance C++ Ambiguity Resolution in inheritance C++ Hierarchical Inheritance C++ Hybrid Inheritance C++ Virtual Base Classes C++ Exercise Abstraction C++ abstract class C++ nesting of classes C++ Exercise Polymorphism C++ polymorphism C++ Exercise pointers C++ pointers C++ Pointers TO object C++ this pointer C++ Pointer to Derived class C++ Virtual functions C++ Exercise Input/output Introduction/font> C++ streams C++ unformatted I/O operations C++ Put() and get() C++ getline() and write() C++ Formatted console I/O C++ Manipulators C++ Exercise File Handling C++ file handling C++ file stream classes C++ Open and closing file C++ open using constructor C++ open using open() C++ Detecting End of file C++ File modes C++ File pointers and Manipulators C++ Sequential I/O C++ Reading and Writing C++ Updating a File C++ Error handling In File C++ Command Line Arguments C++ Exercise Templates C++ Template introduction C++ Class Templates with multiple Parameters C++ Function templates C++ Function templates with multiple parameters C++ member function Template C++ Exercise Exception handling C++ Exception handling C++ Basics of Exception Handling C++ Exception Handling Mechanism C++ Throwing Mechanism C++ Catch Mechanism C++ Catch all Exceptions C++ Re-Throwing An Exception C++ Specifying Exceptions C++ Exercise Procedural Oriented Programming Basic OOPS Concepts Benefits of OOPs C++ History C++ features C++ program structure C++ Installation C++ Comments C++ output operator C++ input operator C++ Header files C++ variables C++ Compiling and linking C++ Exercise C++ Tokens C++ Tokens C++ Identifiers & constants C++ Data types C++ User defined data type C++ derived Data types C++ Symbolic constant C++ Type compatibility C++ Declaration of variable C++ Reference Variables C++ Exercise Operators C++ operators C++ Memory Management operator C++ Manipulators C++ Type Cast Operator C++ Exercise Expressions C++ Expressions C++ Implicit Conversions C++ Exercise Operator overloading C++ Operator Overloading C++ Operator Precedence C++ Exercise Control statements C++ if statements C++ switch statement C++ Do-while statement C++ while statement C++ for statement C++ Exercise C++ functions C++ function introduction C++ function prototyping C++ Call by reference C++ Inline function C++ Default Arguments C++ function overloading C++ Math Library Functions C++ Exercise Class and objects C++ class Introduction C++ Specifying a Class C++ Creating Objects C++ Defining Member Functions C++ Nested OF Member Functions C++ Private Member Functions C++ Memory Allocation for objects C++ Static Data Members C++ Array of objects C++ Friendly functions C++ Returning Objects C++ Pointer to Members C++ Local Classes C++ Exercise Constructor and destructors C++ Constructor Introduction C++ Parameterized Constructor C++ Multiple Constructor C++ Dynamic Initialization of Objects C++ Copy Constructor C++ Dynamic Constructor C++ Destructors C++ Exercise Operator Overloading C++ Operator Overloading C++ Overloading Unary Operators C++ Overloading Binary Operators C++ Overloading Binary Operators Using Friends C++ Manipulation String Using Operators C++ Rules for overloading operators C++ Exercise Type conversions C++ Basic To class Type C++ Class TO Basic Type C++ One class To another class type C++ Exercise Inheritance C++ Inheritance introduction C++ Single Inheritance C++ Multiple Inheritance C++ Multilevel Inheritance C++ Ambiguity Resolution in inheritance C++ Hierarchical Inheritance C++ Hybrid Inheritance C++ Virtual Base Classes C++ Exercise Abstraction C++ abstract class C++ nesting of classes C++ Exercise Polymorphism C++ polymorphism C++ Exercise pointers C++ pointers C++ Pointers TO object C++ this pointer C++ Pointer to Derived class C++ Virtual functions C++ Exercise Input/output Introduction C++ streams C++ unformatted I/O operations C++ Put() and get() C++ getline() and write() C++ Formatted console I/O C++ Manipulators C++ Exercise File Handling C++ file handling C++ file stream classes C++ Open and closing file C++ open using constructor C++ open using open() C++ Detecting End of file C++ File modes C++ File pointers and Manipulators C++ Sequential I/O C++ Reading and Writing C++ Updating a File C++ Error handling In File C++ Command Line Arguments C++ Exercise Templates C++ Template introduction C++ Class Templates with multiple Parameters C++ Function templates C++ Function templates with multiple parameters C++ member function Template C++ Exercise Exception handling C++ Exception handling C++ Basics of Exception Handling C++ Exception Handling Mechanism C++ Throwing Mechanism C++ Catch Mechanism C++ Catch all Exceptions C++ Re-Throwing An Exception C++ Specifying Exceptions C++ Exercise C++ function templates with multiple parameters template return_type function_name(arguments of types T1, T2,….) { ……. …….(body of function) ……. } #include <iostream> #include <string> using namespace std; template<class T1,class T2> void display(T1 x, T2 y) { cout << x << " " << y << "\n"; } int main() { display(1999,"EGB"); display(12.34,1234); } The output is: 1999 EBG 12.34 1234 Basic OOPS Concepts Benefits of OOPs C++ History C++ Applications C++ features C++ program structure C++ Installation C++ Comments C++ output operator C++ input operator C++ Header files C++ variables C++ Compiling and linking C++ Exercise C++ Tokens C++ Identifiers & constants C++ Data types C++ User defined data type C++ derived Data types C++ Symbolic constant C++ Type compatibility C++ Declaration of variable C++ Reference Variables C++ Exercise C++ operators C++ Memory Management operator C++ Manipulators C++ Type Cast Operator C++ Exercise C++ Expressions C++ Implicit Conversions C++ Exercise C++ Operator Overloading C++ Operator Precedence C++ Exercise C++ if statements C++ switch statement C++ Do-while statement C++ while statement C++ for statement C++ Exercise C++ function introduction C++ function prototyping C++ Call by reference C++ Inline function C++ Default Arguments C++ function overloading C++ Math Library Functions C++ Exercise C++ class Introduction C++ Specifying a Class C++ Creating Objects C++ Defining Member Functions C++ Nested OF Member Functions C++ Private Member Functions C++ Memory Allocation for objects C++ Static Data Members C++ Array of objects C++ Friendly functions C++ Returning Objects C++ Pointer to Members C++ Local Classes C++ Exercise C++ Constructor Introduction C++ Parameterized Constructor C++ Multiple Constructor C++ Dynamic Initialization of Objects C++ Copy Constructor C++ Dynamic Constructor C++ Destructors C++ Exercise C++ Operator Overloading C++ Overloading Unary Operators Const pointer in C Void pointer in c C++ Overloading Binary Operators C++ Overloading Binary Operators Using Friends C++ Manipulation String Using Operators C++ Rules for overloading operators C++ Exercise C++ Basic To class Type C++ Class TO Basic Type C++ One class To another class type C++ Exercise C++ Inheritance introduction C++ Single Inheritance C++ Multiple Inheritance C++ Ambiguity Resolution in inheritance C++ Hierarchical Inheritance C++ Hybrid Inheritance C++ Virtual Base Classes C++ Exercise C++ abstract class C++ nesting of classes C++ Exercise C++ polymorphism C++ Exercise C++ pointers C++ Pointers TO object C++ this pointer C++ Pointer to Derived class C++ Virtual functions C++ Exercise C++ streams C++ unformatted I/O operations C++ Put() and get() C++ getline() and write() C++ Formatted console I/O C++ Manipulators C++ Exercise C++ file handling C++ file stream classes C++ Open and closing file C++ open using constructor C++ open using open() C++ Detecting End of file C++ File modes C++ File pointers and Manipulators C++ Sequential I/O C++ Reading and Writing C++ Updating a File C++ Error handling In File C++ Command Line Arguments C++ Exercise C++ Template introduction C++ Class Templates with multiple Parameters C++ Function templates C++ Function templates with multiple parameters C++ member function Template C++ Exercise C++ Exception handling C++ Basics of Exception Handling C++ Exception Handling Mechanism C++ Throwing Mechanism C++ Catch Mechanism C++ Catch all Exceptions C++ Re-Throwing An Exception C++ Specifying Exceptions C++ Exercise Previous Next