I believe there are plenty of sample codes in the net regarding
sort..anyway, i think this could help...

int i_error[5] = {15, 3, 6, 7, 8};

for (int i = 0; i < 5; i++) {
   for (int j = 0; j < 4; j++) {
        if (i_error[j] > i_error[j + 1]) {
            int temp = i_error[j];
            i_error[j] = i_error[j + 1];
            i_error[j + 1] = temp;     
        }
   }
}

--- In [email protected], tunde oke <[EMAIL PROTECTED]> wrote:
>
> Hello,
>   Thanks for the reply....i actually dont understand the code you
sent me because you wrote it in c,c++ and safe c++.I am just learning
C++ and i am trying to finish an assignment....the last part of the
assignment requires sorting that was why i posted that.
>   Now am specifying...i need the code in c++.
>   Thanks
> 


Reply via email to