@H00G0 Your linked examples are bad practice; if someone wants to reinvent the wheel, he/she should at least assure that his code is STL conform so that the sorting function would be exchangeable later.
This means that the function takes a pointer to the first element and one beyond the last, and optionally taking an address to a comparing function.
@nuderobmonkey I didn't post those links so that OP could copy and paste the code in there, as I said I encouraged him
to practice coding [his] own sorts
. The links were merely a way of explaining how those sorts work, since they provide a pseudocode and video that explains quite well how they work. The way you go about implementing the logic is your choice.