First of all, my english is not the best, but I think you'll understand me.
While I'm loading an array, i need to stop that loading with the value "-1", but I don't know where to put the if that I need. Here is my example, obviously it's not correct.
ARRAY is my ARRAY that I'm loading. It has 10 slots.
CONT is a counter to know from where I have to fill with "0" my array.
CONT = 0
cout << " Enter a value for: ["<<i<<"]" << endl;
cin >> ARRAY[i];
CONT++;
if (ARRAY[i] == -1){
for (int i = CONT; i < 10; i++){
ARRAY[i] = 0;
}
}
cout << "CONT = "<<CONT<<endl;