Problem 1. Arrays in C++ use 0 based indexes. Your 3 variable array will have indexes 0, 1, and 2. Index 3 is out of bounds, and will cause a compile error.
Problem 2. cin >> threeValues [3]; Does not input 3 values. It only inputs a single value into index 3 (which we've already determined is out of bounds anyways). You will need a separate prompt for each index of the array, preferably done with a for() loop.
I editted my first post with the for() loop. The loop works, but when the I cout threeValues [0], it displays -858993460 and still shows the same error message...
The for () loop you posted worked, and when I cout threeValues [0], it shows t he correct number. The only problem is that I still get the same error message....
you are only giving it 2 elements, threeValues[0] and threeValues[1]. Thus when you run the for() loop and take in three integers, you get the error because you did not make a spot for the third.
Also, when you go to output the three numbers, use the same logic as the for() loop posted above, to cycle through and cout each element.