What would be an easy way to construct a vector triplet of ints in CPP?
i.e instead of a pair of 2 ints ,
std::vector<std::pair<int, int> > vec;
I want 3 int's tied together as one element of the vector.
I realized one way would be to make 2 sub-nested pairs, but this method gets messy. I am not aware of all the details of CPP, therefore please recommend an easier way if available. Thank you.
std::vector<std::tuple<int,int,int>> myvec;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With