I\'ve ported to C++ (well, I guess mostly C) this Java 3-Way radix quicksort implementation (page 27):
//Java code from the linked Princ