I have to create another vector in which I only copy the unique party names.
I want to do so by using a loop that goes through the first vector with all the party names, and another loop that goes through the second vector of unique names and only adds a value if it does not exist.
I do not want to use std::sort or std::unique or anything of that kind, just the most basic way to do it.
I am not sure if my loops are correct or how to copy elements of one vector into another.
All party names:
Unaffiliated
Federalist
Democratic-Republican
Democratic-Republican
Democratic-Republican
Unique party names:
Democratic-Republican
Federalist
Unaffiliated
In other words the goal is not "use of C++", but "to learn to think".
Ignore the C++ syntax for now and list the logical steps that the program has to take. The algorithm. Once you have that, then it is time to figure a syntax for the steps.
Your initial code fragment looks like that you have lost in the details of syntax without "big picture".