Hi, I have written a program that is supposed to output the results of an election between five candidates. The void function I have written to print the results is not printing anything when called. I am not receiving any compiler errors, and the rest of the program runs fine.
I am using Eclipse 3.8.0, with C++ add-on eclipse-cdt 8.1.0+dfsg-2, Ubuntu 12.04
declaration
void printResults(string candidates[], int canVotes[], int canIndex, int voteIndex, int totalVotes);
Any hints about why this is not printing? If I put a "cout" after the function call in int main it prints it, just not anything from the void function.
for (canIndex = 0; canIndex < 0; canIndex++)
-Set canIndex equal to 0 every time
-Check if it is less than 0
-If less than 0, run the code and increment canIndex by 1