I am trying to compose a vector of all unique elements from another vector,
I have used this method before with strings in Java, but I cannot get it to work in C++ right now.
I clear the unique vector each time since in findUnique() I push it back and I want it to start pushing back at a[0] instead of just adding to the vector...
I really do not see what is wrong with this....
when I go to print out unique each time through it prints nothing because unique never has anything added to it....it is always having length 0
If b is empty (which it starts out to be), then the for() loop on line 38 never executes, which means the push_back() on 47 never executes. (There is an algorithmic problem here which you can figure out).
In find unique, there is one problem with an incorrectly placed closing bracket }. You have made it this far, I am sure you will find it if you look really hard.