I do a task:

Shadows of the Knight - Episode 1. Task: Batman will be using his grapnel gun. Where the hostages are located in order to disarm the bombs. The bombs go off ... Rules

If you want to make it, it will help you to ensure that you will be able to ensure that you will be able to make it up for you to travel on your car’s current position: U (Up) UR (Up-Right) R (Right) DR (Down-Right) D (Down) DL ( Down-Left) L (Left) UL (Up-Left)

My part of the code is:

while (1) { string bombDir; // the direction of the bombs from batman's current location (U, UR, R, DR, D, DL, L or UL) cin >> bombDir; cin.ignore(); if ( bombDir == "U") array[1][1] = Y0 - 1; if( bombDir == "D") array[0][1] = Y0 + 1; if ( bombDir == "L") array[1][0] = X0 - 1; if ( bombDir == "R" ) array[0][0] = X0 + 1; X0 = array[0][0] + (array[1][0] - array[0][0]) / 2; Y0 = array[0][1] + (array[1][1] - array[0][1]) / 2; // Write an action using cout. DON'T FORGET THE "<< endl" // To debug: cerr << "Debug messages..." << endl; // the location of the next window Batman should jump to. cout << X0 << Y0 << endl; } 

Gives an error message:

Standard Output Stream: 00 Game information: Failure: invalid input. Expected 'xy' but found '00'

My question is: what am I doing wrong?

Closed due to the fact that off-topic participants are Harry , Kromster , pavel , aleksandr barakin , user194374 Dec 2 '16 at 8:13 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - pavel, aleksandr barakin, community spirit
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Who gives this message? Is this a compilation error, is it a runtime error, or does the program itself issue this message? In which sentence does this error occur? - Vlad from Moscow
  • Guessing on the crystal ball shows that you need to add a space between the displayed values. // the location of the next window Batman should jump to. cout << X0 << "" << Y0 << endl; But I join the idea of ​​"learn to formulate questions" in every possible way. - Alexey Esaulenko

0