Re: instances of my student class help!!
Kirk Bevins wrote:[color=blue]
>
> Ok thanx for the help here guys ive finally cracked it!!!!
>
> My next problem is implementing a bubble sort:
>
> if (sortYesNo==1) {
> int L, L2 = e;
> while( L2 > 1 ) {
> L = -1;
> for(int p = 1; p < L2; p++) {
> if( student[p - 1] > student[p] ) {
> (student[p - 1]).swap(student[p]);
> L = p;
> }
> }
> L2 = L;
> }
> }
>
> the .swap doesnt seem to want to work ahhhhhhhhhhhhhh !!!!
>[/color]
Suggestion:
Don't post a message saying: 'Doesn't work'.
Post: I have a problem with an error message from the compiler which I cannot
sort out. This is the message ... and this is the line the compiler flags ....
Post: This function doesn't do what I think it should do. It should ...., but
it does ...
--
Karl Heinz Buchegger
kbuchegg@gascad .at
Kirk Bevins wrote:[color=blue]
>
> Ok thanx for the help here guys ive finally cracked it!!!!
>
> My next problem is implementing a bubble sort:
>
> if (sortYesNo==1) {
> int L, L2 = e;
> while( L2 > 1 ) {
> L = -1;
> for(int p = 1; p < L2; p++) {
> if( student[p - 1] > student[p] ) {
> (student[p - 1]).swap(student[p]);
> L = p;
> }
> }
> L2 = L;
> }
> }
>
> the .swap doesnt seem to want to work ahhhhhhhhhhhhhh !!!!
>[/color]
Suggestion:
Don't post a message saying: 'Doesn't work'.
Post: I have a problem with an error message from the compiler which I cannot
sort out. This is the message ... and this is the line the compiler flags ....
Post: This function doesn't do what I think it should do. It should ...., but
it does ...
--
Karl Heinz Buchegger
kbuchegg@gascad .at
Comment