Check out example codes for "c++ vector structure". It will help you in understanding the concepts better.

Code Example 1

#include <vector>

typedef struct test1 {
  int a;
  char b;
} TOTO;

std::vector<TOTO> _v;

_v.push_back((TOTO){10, 'a'});
_v[0].a = 101;

Learn ReactJs, React Native from akashmittal.com