Friday, August 6, 2010

I'm taking a couple of computer science classes in the fall, and they assume a prior knowledge of C++. Accordingly, I decided that I should probably learn it ahead of time, and have spent the last week attempting to do so. I've come to the point where I'm fairly comfortable with the syntax and style. Behold, a sort function I've just written!
I must say, I'm not a fan of member functions. I understand their purpose as far as making the code easier to read, but setting them up and debugging them seems not worth the hassle. As far as language evangelism goes, I think I prefer the functional style.

1 comment:

Manoj said...

I agree. Member functions provide a bigger scope for programming but a real pain to debug.

Btw, is it selection sort algorithm?