Welcome to the computer programming homepages of Malcolm Phillips
You may use any of the C++
sorting algorithm source code on this site however you wish, though I would
appreciate being credited as appropriate, particularly in the cases where I have
stated that to the best of my knowledge so far, I may be the inventor.
I use the K & R indentation style where the opening brace goes on the end of the previous line. My apologies to anyone that dislikes this style and finds it harder to read.
I also appologise for the crude look of this site. Web programming and I just haven't really connected yet.
You'll notice that I appear to deliberately avoid using the Standard C++ Library (SC++L), or what some would bluntly, and somewhat inaccurately, refer to as the STL. Yes, this is deliberate, but no I do not make a habit of this when writing C++ code on a daily basis, quite the opposite in fact. The reason here is that I want it to be easy to port to other languages, and it helps to be able to see all the bits of code that go into each algorithm. The code here is for learning, not to compete with the SC++L. If you are using the SC++L then you should probably use std::sort.
All the code here should compile with VS2008 Express, however I have often not tested it on any other compilers. I'd be happy to hear of any changes I can make to ensure it compiles with other compilers.
To anyone interested in what tool I used to format the code, it is a simple C++ parser I wrote in Delphi, that spits out the raw html - crude but effective.
I plan on releasing the source code to my Mega Sorting Demo program (104933 bytes zip file) some time in the not-too distant future. Of course it'll happen sooner if people bug me for it. In fact I have a more recent compiled version I keep meaning to upload, already. No, I'm not planning on writing a java version, in case anyone asks.
Also coming soon (maybe), a demo of my software 3D renderer.