Answers for "how to traverse nested vectors"

C
0

how to traverse nested vectors

// Displaying the 2D vector
    for (int i = 0; i < vec.size(); i++) {
        for (int j = 0; j < vec[i].size(); j++)
            cout << vec[i][j] << " ";
        cout << endl;
    }
Posted by: Guest on September-29-2021

Code answers related to "C"

Browse Popular Code Answers by Language