How can I do the following? I read up on Variable Arguments last time I asked this question (Mike pointed me in the right direction).. but it still does not let me define any number of them.. I Do not want to specify the first parameter and if I do, it has to be a custom type.
Class M
{
private:
vector<MyTypes> P;
//Constructor..
//Destructor..
M& Insert(...)//or M& Insert(MyTypes, ...) //where ... can ONLY be "MyTypes"
{
for (int I = 0; I < #ofArgs; I++)
P.push_back(Args[I]);
return *this
}
}
I looked at doing it via templates but how can I even do that when I'm trying to do it in a class and access it without having to put template<.....> in front of it every single time.