I am writing a code , to inherit a vector class like this :
struct A {
int dataA;
int dataB;
};
class B : std::vector<A> {
};
May I know, how can assign value to the vector, say dataA =5, data B =6 and the second data A =7, data B =9... and how to access the value when I am running the program? Can I call in this way B[0].dataA ?
thank you..
struct A {
int dataA;
int dataB;
};
class B : std::vector<A> {
};
May I know, how can assign value to the vector, say dataA =5, data B =6 and the second data A =7, data B =9... and how to access the value when I am running the program? Can I call in this way B[0].dataA ?
thank you..