Dec 1, 2017 at 2:51pm UTC
Welcome to the forum. and thank you for using code tags.
I am having problems setting up this code to compile and test. I do not know what you did in main before calling the "partition" function.
Looking at your code I am not sure right now if it will even work. Sorting a vector is much like sorting an array. Right now I am not sure if you are going about the sort the right way.
The "swap" function I do not believe that this is correct. You are defining "temp" as a whole vector when an int will do. Swapping the values of two elements is all you need to do.
The function name "partition" does not describe what the function does very well. I would stay away from a name like "sort" or "Sort" and maybe call it "SortVector" to describe what the function does.
If you do not mind posting the whole code so I can see what you did and better be able to test the code.