This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
This is a pretty easy task. | |
Define a structure ( well this is called a trait ) called is_same inside a namespace gstd that returns true if the types | |
passed are same and false if types are different | |
prerequisites | |
* Templates in C++ | |
* Specialization of Templates | |
* Partial Specialization of Templates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Task1 | |
There are three classes in this program | |
1. Demo : Holds a temporary string buffer inside it | |
2. Base : Parent class with a Demo object inside it ( Polymorphic Base of Derived ) | |
3. Derived : Child class that derives from Base and contains a seperate object of Demo as well | |
This program contains an error that goes undetected during runtime ( memory leak ).Your task is to find that error and write | |
the correct version of program such that no memory leaks occur. |