B
B. Williams
I have been given an assignment to create a class template. I have begun to
create the template and I know what I want public and private, but I am lost
with how to format my constructor so that it will take any value (ie int vs
bool vs string). Will someone offer me some assistance?
#ifndef TryOME
#define TryOME
template <class R, class S, class V>
class TryOMe{
public:
TryOMe(int, int, int, int); <---- What do I put in here?
private:
S var1;
V var2;
V var4;
R var3;
};
#endif
create the template and I know what I want public and private, but I am lost
with how to format my constructor so that it will take any value (ie int vs
bool vs string). Will someone offer me some assistance?
#ifndef TryOME
#define TryOME
template <class R, class S, class V>
class TryOMe{
public:
TryOMe(int, int, int, int); <---- What do I put in here?
private:
S var1;
V var2;
V var4;
R var3;
};
#endif