F
Fabien
Hi!
I'm trying to do something that is perhaps impossible to do.
I have two classes : Attribute and SetOfAttributes
Here is Attribute.h
template <typename T>
class Attribute
{
T _value;
};
I'm trying to do this :
class SetOfAttributes
{
std::vector<Attribute> _attributes;
}
int main(...)
{
SetOfAttributes set;
set._attributes.push_back(new ZAttribute<float>());
set._attributes.push_back(new ZAttribute<int>());
}
Which, of course, doesn't work. I can't find the correct syntax to do
it.
Any idea ? Thanks a lot!
I'm trying to do something that is perhaps impossible to do.
I have two classes : Attribute and SetOfAttributes
Here is Attribute.h
template <typename T>
class Attribute
{
T _value;
};
I'm trying to do this :
class SetOfAttributes
{
std::vector<Attribute> _attributes;
}
int main(...)
{
SetOfAttributes set;
set._attributes.push_back(new ZAttribute<float>());
set._attributes.push_back(new ZAttribute<int>());
}
Which, of course, doesn't work. I can't find the correct syntax to do
it.
Any idea ? Thanks a lot!