EDIT: no full code, see the FAQ
Hey,
Please, do not display your code to others. Try to explain your problem ;)
Also, on the top of the puzzle page, there is a button “I need help” that will open the forum thread specific to the puzzle. This is easier for people to help you doing so, instead of creating your own thread.
As for your problem:
1 - Can you tell me what single quotes do in C++? Same question with double quotes.
2 - You might use cerr (as explain in the IDE: // To debug: cerr << “Debug messages…” << endl; ) to verify what are your thorX and thorY values.
3 - It does not cause you any problem in the 4 tests of the IDE, but you forgot an else after your first if. That means that if you enter the first if, you modify thorX value and you might enter in another if afterwards, modifying the direction (which is not what you want).