What I'm trying to do is to have the program pick random people for different jobs. The user enters the number of people, then, enters both jobs and the people's names. I need the program to pick random people, but randomly pick again if the person has already been picked, so, no repeats. I have the program picking random people, but I can't get it to not pick the person again. I'll run it and there will be no errors, but it's almost like Xcode completely bi-passes the for/if to check if it's picked the person already.
Below is the code.
Line 15,70,98: It's not legal to allocate an array this way using a variable in C++.
Line 18,24,73,79,99: Your for loops are defective. You're going to be indexing out of bounds. If number=10, array elements are 0-9. <= is going to index an non-existant element [10].
Line 54-55, 103-104: Why are these lines duplicated?
Not going to try parse that spagetti code, but I would suggest you, instead of picking random people, just shuffle your array. After that people in the array would be in the random order and you can just pick one by one.
Standard library has random_shuffle() function: http://www.cplusplus.com/reference/algorithm/random_shuffle/