2009-12-04, 09:14 PM
[COLOR="Red"]Hi guys, I'm having troubles.
http://pastie.org/728471
That is the code.
array1 is a template class with 30 people in it.
array is a template class with 8 vehicles in it.
What I want accomplished is that 8 random people's ids (an attribute of the People template class) are given a car.
What i have correct is that there are always 8 random people's id's chosen. The countV is also increased to 8.
What I'm having troubles with is always displaying 8 winners. More often than not, only 7 winners' names are shown. Sometimes 8, sometimes 6, once or twice 5.
Now, what is going wrong, and how can i always make 8 people's first names show up?
[/COLOR]
http://pastie.org/728471
That is the code.
array1 is a template class with 30 people in it.
array is a template class with 8 vehicles in it.
What I want accomplished is that 8 random people's ids (an attribute of the People template class) are given a car.
What i have correct is that there are always 8 random people's id's chosen. The countV is also increased to 8.
What I'm having troubles with is always displaying 8 winners. More often than not, only 7 winners' names are shown. Sometimes 8, sometimes 6, once or twice 5.
Now, what is going wrong, and how can i always make 8 people's first names show up?
[/COLOR]

