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?