> There seems to be no output when I key in 0
I don't understand, please rephrase.
The condition in line 78 is outside the loop of line 68
The input loop (63--67) is incorrect, note its equivalent form
1 2 3 4 5 6
i = 0;
while(arr[i].Oper!="0"){ //uninitialized
cin>>arr[i].Oper>>arr[i].s1>>arr[i].s2; //here you put some value
N++;
i++; //but you increased the index, so you'll check the next element (uninitialized)
}
There is no output because your reading is incorrect, the loop in line 63 never ends.
The snip that I've posted is equivalent to yours, it has the same error. I thought that it would be easier to see it for you.
1 2 3 4 5 6 7 8 9
int count = 0;
while(
std::cin
>>arr[count].Oper
>>arr[count].s1
>>arr[count].s2
and arr[count].Oper not_eq "0"
)
++count;