C++: Array within Tuple within Vector gets replaced with last entered
Here is a Minimal Reproducible Example: #include <iostream> #include <vector> #include <tuple> using namespace std; int main() { vector<tuple<char *, int, int>> test; cout << “During Loop:” << endl; for (int i = 0; i < 4; i++) { char letters[3]; int firstNumber = i; int secondNumber = 4 – i; switch (i) { case … Read more