Having trouble copying a vector<string> to ostream && program runs pretty slow
Hi all, Program Description: I've written a program that take an int (n) input, initializes a vector of (n) elements (candidate), then runs two functions on each element to assign a name (string) and a vote count (integer). Then the program sums the total number of votes and assigns each element of the vector a percentage (float) of votes. The program also calculates the max votes of any one (candidate). The program initializes a vector<string> to store the names of candidates with the max number of votes (in case of a draw). Then the program prints the results out and it should print out a string with the contents of the winning candidate vector as well. Questions for y'all: 1. However, the program is not outputting the string of the winning candidates. 2. Additionally, the entire program runs pretty slowly despite few entries. Link to code: https://code.sololearn.com/ct1dz49SCJfF/#cpp Any insights into these two issues would be helpful.