Question: Learning Phase: Search in web for generics/templates in C++. Analyze what is generics and what's the purpose of using generics. Now write a generic function

 Learning Phase: Search in web for generics/templates in C++. Analyze what

Learning Phase: Search in web for generics/templates in C++. Analyze what is generics and what's the purpose of using generics. Now write a generic function for adding two different types of variables. e.g. : variable Add(variable a, variable b) [Here variable could be of any data type] If you are done with the learning phase, then do the following. Create your own STL library as mySTL.h Your assignment is to create a mySTL. h header file in C++ that will contain these templated classes and methods. Finally demonstrate the use of your mySTL library in a demo.cpp file. You must submit two cpp files 1. mySTL.cpp and 2. demo.cpp

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!