~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Wastes can be put to good use by recycling them.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

haha, ~s.o.s~ we're in the same boat. So much for being original...

Hey look at the brighter side, it is original...:cheesy:

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

It would really be interesting to know which book you are referring.

A book with flawed algorithm of such a simple sort is not a book worth reading....

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Since you are calling the function of the object (ie the member function) you don't need to pass anything to the function, since the object contains all that is needed to sort its elements. Just don't forget to update the length of the internal list and it should be fine.

Also write another function which checks whether the Object contains atleast one element before sorting so as to avoid crashes.

Something like:

void arrayList::sortAscend ()
{
    // here length and list are the member variables of the object
    // & and hence can be directly accessed
    for(int i = 0; i < length; i++) 
    {
        for(int j = 0; j < length - i; j++)
        {
            if(list[i] > list[j + 1])
            {
                int temp = list[j]; //swap
                list[j] = list[j + 1];
                list[j + 1] = temp;
            }            
        }        
    }    
} //end sortAscend function

Oh, and btw, your sorting logic is flawed. A simple fix would be:

for(int i = 0; i < length - 1; i++)
    {
        for(int j = i + 1; j < length; j++)
        {
            if(list[i] > list[j])
            {
                int temp = list[i]; //swap
                list[i] = list[j];
                list[j] = temp;
            }
        }
    }
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

boot

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Pogo is really a good channel for the kids.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Since google seems to be ignoring ( ~ ) and ( . ) and sos is a fairly famous term (the term used for help or call for help) I guess I am on my own.... ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Try using forward slashes ( / ) instead of back slashes ( \ ).

Read this.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

doom

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Such a thing

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

immortality -> illusion

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Long-winded police are looming WITH heartless criminals, knowingly.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Gamey people are always up for a challenge.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

It is obvious

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

some

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

and the skies

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

relief from venom -> death

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Long_legged police are looming over HEARTLESS criminals, knowingly

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

node


PS: Btw Chaky, congratulations on your 1000th post. ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

deadly -> pit viper

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

your way don't

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Ouch, that must

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

unit

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Heard sounds so very much like herd.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Long-legged giants are looming over cracked VOLCANOES, hastily.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

unite

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Disembodiement is normally a word used in gory games, not recommended to be played by kids.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

innate

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

grind

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

more fun -> funnily enough ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

....except that changing the language is not the topic under discussion here.

Btw there is a plethora of interpreted / compiled langauges out there which provide the same ease of use, so I guess Ruby isn't that spectacular after all....

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

grip

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

grape

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Just a minor point, better use ++variable instead of using variable++. If done so prevents the creation of a temporary variable. This is a normal hack used by all programmers.

• Pre-increment(++a) - Increment the value of variable and then use it.

• Post-increment (a++) - Use the value of variable and then increment it.

Since we just want the value of variable to be incremented, just use pre-increment.

John A commented: Thanks for the info :) - joeprogrammer +6
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Hollywood actress -> blondes

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

which goes like

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You get to pay the fine.

I put in all the n00bs.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Long-legged GIANTS are chasing over cracked rooftops, hastily.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

a thick layer

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

rep

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Here to stay, I am.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I am (immortal - 1), turning immortal on Feb 30th... ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

no, endl should be the standard way to do things.
\n is not portable, it's a throwback to C.

LF or newline is a character which belongs to the ASCII character set. Is priting out characters using streams non portable ? Cit any one situation which showcases its non portability....

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Try finding one / giving a card...

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

spring

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Why thankyou joe! And colleges anyone know for art texturing!?

This and this.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

omnibus -> omnipresent

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

one needs to

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Is this really

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You get silence of the lambs.

I put in acrobat reader.