I'm trying to create a table in C++ that can contain various data types. Therefore I've created a virtual template class "Column" and derived from it "IntColumn", "FloatColumn", ecc. Then I wanted to create a std::vector to fill it with all the columns. The problem is that if I try to create a vector of Column type I should then specify the type of the Column (because it's a template) and if I want to create a Child type object I can't because it says the constructor is implicitly deleted.
I know it may seem stupid to you, but I'm new to these things and I can't really figure out what to do in this case.
My goal is to be able to create a vector of columns (that can store int, float, char, string, Date, Time types) and have methods that can extract data from all the types of columns. (Date and Time are classes I've already created)
If I should include some code just tell me.
I don't know what your column type should represent, so there are two approaches I'll give you: