Hey everyone, new to the forum since looking for help since I'm new to C/C++ in general. I'm trying to get this bubble sort method working and I think it is, but when I try to run it I keep getting the issue of it being undefined. I know it's probably something stupid but not too sure how to apply to my code.
1 2 3 4 5 6 7 8
int j;
for (i = 0; i < size; i+= 1) {
for (j = i - 1; j >= 0 && int_array[j] > int_array[j + 1]; j+= 1) {
int temp = int_array[j];
int_array[j] = int_array[j + 1];
int_array[j + 1] = temp;
}
}