Hi all, I am trying to give a range to the user inputs, between 1 to 10 as it is being inserted into an array of size 3.
I think I have totally messed up and did it wrongly as there is an error that says 'error: no match for ‘operator>’ in ‘std::cin > 10’'
1 2 3 4 5 6 7 8 9 10 11 12 13
int main()
{
int array[3];
for (int i=0; i<3;i++)
{
cout << "Enter in value for Number " << i + 1 << " : " ;
while (cin < 0 || cin > 10)
{
cin >> array[i];
}
}
}