I am trying to create a character array as a first step in a function that deletes repeated characters from the array. However, after I cin the first character, I get the bizarre output of ten upside-down question marks. Any ideas as what is going on here? Thanks.
You're trying to extract alphabetic input into an int which causes line 11 to fail and put std::cin into an error state so that input is never assigned any value and instead consists of the random junk occupying it's memory which you assign to the elements of the array?
One of your other problems is you are referencing foo[i] in a for loop using x. This is why it's dangerous and wrong to take the initilizations for the for loop outside the scope of the for loop. Try fixing that and see what you get.