#include <iostream>
#include <string>
#include <typeinfo>
usingnamespace std;
template <class T>
class Generic {
private:
T object;
int items;
public:
Generic(T instance, int no_items);
~Generic();
};
template <class T>
Generic<T>::Generic(T instance, int no_items){
object=instance;
items=no_items;
cout<<typeid(object); //cannot print out says << no match...how can I solve this
}
template <class T>
Generic<T>::~Generic(){}
class Test{
private:
int num;
};
int main(){
Test test;
int items;
cout<<"Enter X items: ";
cin>>items;
Generic<Test> gen(test, items);
}