Look, reading your code, his problem is this ...
The first for () makes the interactions going from the inline row of your array.
The second for () makes the interactions traversing the columns of the array. When you find a value at position c that is greater than c + 1, both on the same line, you plot the position values. OK! But that's not bubble sort. You need to create a third loop to continue checking if that element that was in column c is still larger than the one in c-1. For example:
7 8 5 4
0 6 5 4
1 4 2 5
2 4 2 5
Let's run your code only on the first line:
1-7 is greater than 8? not! continues the tie ...
2-8 is greater than 5? yea! exchange! continues the tie ...
now we have in the first line the following:
7 5 8 4
Is 3-8 greater than 4? yea! exchange! continue the loop ...
7 5 4 8
See the problem? He does not continue to order ...
My suggestion is as follows:
it's "ugly" to create a bond over there ... I think.
Create a program that traverses row by row of array and calls bubble sort for each row. Why, each line is still a vector, right? And vectors you know how to organize. Pass to the bubble function that you created to array array vectors. Ready.