EDIT After doing some more reading around C++, I managed to concise my question on what exactly I want to do. Basically, I have two vectors: