Answers for "cpp vector structure"

C++
1

cpp vector structure

#include <vector>

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

std::vector<TOTO> _v;

_v.push_back((TOTO){10, 'a'});
_v[0].a = 101;
Posted by: Guest on October-07-2020

Browse Popular Code Answers by Language