E
E
Evgeny Semashko2020-09-21 21:12:01
C++ / C#
Evgeny Semashko, 2020-09-21 21:12:01

How to swap strings in a 2D array?

There is a two-dimensional matrix MxN and the user selects 2 rows to be swapped.
How to implement swapping of two strings?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur Pokrovsky, 2020-09-21
@evgenysemashko

string temp = matrix[m1,n1]
matrix[m1,n1] = matrix[m2,n2]
matrix[m2,n2] = temp

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question