Your solution has a bug, it sometimes calls positions.front() when positions is empty.
positions.front()
positions
It's a bug in your solution, not a kata issue.
[C++] I literally tried my code with the input case "Success" and it displays the correct output on my compiler. But on this website, when I run, it displays "(((c())" instead of ")())())"
There still are for C++: Expected: equal to -168 Actual: 0
Loading collection data...
Your solution has a bug, it sometimes calls
positions.front()
whenpositions
is empty.It's a bug in your solution, not a kata issue.
[C++] I literally tried my code with the input case "Success" and it displays the correct output on my compiler. But on this website, when I run, it displays "(((c())" instead of ")())())"
There still are for C++:
Expected: equal to -168
Actual: 0