Wastes can be put to good use by recycling them.
John A commented: Thanks for the info :) - joeprogrammer +6
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
Wastes can be put to good use by recycling them.
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:
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....
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;
}
}
}
boot
Pogo is really a good channel for the kids.
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.... ;)
doom
Such a thing
immortality -> illusion
Long-winded police are looming WITH heartless criminals, knowingly.
Gamey people are always up for a challenge.
It is obvious
some
and the skies
relief from venom -> death
Long_legged police are looming over HEARTLESS criminals, knowingly
node
PS: Btw Chaky, congratulations on your 1000th post. ;)
deadly -> pit viper
your way don't
Ouch, that must
unit
Heard sounds so very much like herd.
Long-legged giants are looming over cracked VOLCANOES, hastily.
unite
Disembodiement is normally a word used in gory games, not recommended to be played by kids.
innate
grind
more fun -> funnily enough ;)
....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....
grip
grape
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.
Hollywood actress -> blondes
which goes like
You get to pay the fine.
I put in all the n00bs.
Long-legged GIANTS are chasing over cracked rooftops, hastily.
a thick layer
rep
Here to stay, I am.
I am (immortal - 1), turning immortal on Feb 30th... ;)
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....
Try finding one / giving a card...
spring
omnibus -> omnipresent
one needs to
Is this really
You get silence of the lambs.
I put in acrobat reader.