I am having trouble with some code. I am getting “Runtime Error” whenever I run the out-commented code in this for-loop, and I can’t figure out why.
I think it has something to do with how scanf reads strings, but I can’t figure out why.
Could you possibly provide a hint as to why?
It doesn’t matter which string I try it on.
for (int i = 0; i < test_cases; i++)
cin >> input;
cout << onp(input) << endl;