string array 2d c++
- Declare a 2D array of strings:
string arr[row][col];
- Initialize the elements of the 2D array:
- Using nested loops, iterate through each row and column
- Assign values to the elements using the index notation:
arr[i][j] = "value";
- Access and modify elements of the 2D array:
- Use the index notation to access elements:
arr[i][j]
- Modify elements by assigning new values:
arr[i][j] = "new_value";