Parallel Arrays

Pages: 123
idk where to go from there
void sortData(int size, char studentName[][6]){
bool swap;
int temp[6];

do {
swap = false;
for (int count = 0; count < (size - 1); count++) {
if (strcmp(studentName[count], studentName[count+1]) > 0) {
strcpy_s(temp, studentName[count]);
strcpy_s(studentName[count], studentName[count+1]);
strcpy_s(studentName[count+1], temp);
swap = true;
} // end if
} // end for
} while (swap);

}


i got this now. still some errors though
Topic archived. No new replies allowed.
Pages: 123