Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions