Check your code again. The looping construct you have used does simple insertion which you want and doesn't sort the vector in any way.try your code on an integer vector may be to confirm the problem.
csurfer 422 Posting Pro
amrith92 commented: Well Spotted! Man am I blind!! +2