Hello Group,
I have a class
class Simple2 {
publica:
Simple2();
list<int> *l1;
list<int> l2;
};
I am writing the constructor
Simple2::Simple 2 {
// It is easy to initialize l1
l1 = new list<int>;
}
How do I initialize l2 data member? The same thing I would like to ask
for vector class, if
it is an object and not a pointer how do you initialize template
classes.
Thanks for your help.
Nagrik
I have a class
class Simple2 {
publica:
Simple2();
list<int> *l1;
list<int> l2;
};
I am writing the constructor
Simple2::Simple 2 {
// It is easy to initialize l1
l1 = new list<int>;
}
How do I initialize l2 data member? The same thing I would like to ask
for vector class, if
it is an object and not a pointer how do you initialize template
classes.
Thanks for your help.
Nagrik
Comment