You don't need to loop on m if you know the row index.
That would solve your main problem. Use ==, not =, when comparing for equality (your if statement). You also appear to be breaking out of the column loop even if the value isn't found: you don't need the "else".
Please use code tags (and post complete programs).
selected randomly is given, in the sense we mean.
for (int m = 0; m < row_size; ++m)
which checks every row.
if you randomly select it, the code should be
m = a_random_row;
for(all the columns of the mth row)
there is no point in checking to see if m is the selected row in a loop. Just use the selected row: the POINT of array like structures is the direct access, you don't need to LOOK for what you already know.