I have this class:
template<typename T>
class array_eraser
{
T* array;
int size_array;
public:
array_eraser(T &a[], int s)
{
size_array = s;
array = new T[s];
array = a;
}
}
I call the class with this line in main:
std::string langs[] = { "C++", "Haskell", "Ada", "Python", "Ada" };
array_eraser<std::string> le(langs, sizeof(langs) / sizeof(langs[0]));
and I got this error: cannot convert argument 1 from 'std::string [5]' to 'T *[] What did i do wrong?