Quote Originally Posted by Salem View Post
So we can have even half a chance at making it crash in the same way you're seeing, can you provide a text file containing an example terminal session.
Ideally, we need to be able to do
prog.exe < input.txt

If it's crashing, use the debugger and start looking around for things like variables with unexplainable values.
can you tell me how i can give you the text file from my session?


Quote Originally Posted by nvoigt View Post
Some hints how you could structure your program so that finding mistakes is easier:

Name your stuff for what it is. You have a lot of "i", "flag" and other nondescriptive variables. I have a tough time seeing if "i < x" is correct when I have no clue what i or x are. Is one of them the user input? If so, name it userinput. Is one of it the voter array index? Name it voterindex.

Your set_Points method is very unintuitive. If I set points to x, I would expect points to be x afterwards. If you need to add points frequently, you can write a second method with another name (add_Points maybe) that actually adds points.

Your logic of voting is one huge block that is hard to follow. Split it into smaller functions and name them after what they logically do.
you are absolutely right
even my self i have trouble reading it
i will try to rewrite my code but this time i'll try to follow your suggestions
thanks for the tips