+ 5
What is the meaning of this message in C++ Code Playground?
https://code.sololearn.com/c9O6rFKoxYd0/?ref=app It happened after I made that x as -x
6 Answers
+ 2
it is just the consecuence of an uncaught runtime exception. Try
int main() {
throw 1;
return 0;
}
+ 2
I think the error 'std::out_of_range' seems legit; as fromthe first iteration -x will be -4 it'll be substr(-4).
I want to know what the "unusual way" would be.
I don't do cpp so I don't know much.. just wanted to make a loop pattern to help someone else
+ 2
Oohk, Bebida Roja. Thanx for clarifying!
+ 1
That seems interesting. I don't understand your code very much, but I think you discovered a bug in sololearn. Maybe you should try to report it to the staff.
+ 1
happy to help
+ 1
trying to call substr() with a negative starting index results in a runtime error afaik