cin >> letter >> position; //This is inside the main(). void moveLetter(char letter, int position) {` if (upperRowPiecesToPlay.find(letter)) { upperRowPiecesToPlay.replace(letter,1 , " "); switch(position) { case 1: if(p1 == '.' ) { p1 = letter; } break; So, this is my code.
I'd like to find a character(input from a user) from the given string. And replace it with empty space.
However, obviously this is not how I should use the find and replace.
Please teach me the right way...
upperRowPiecesToPlayis (presumablystd::string) and whatp1is (presumablychar). What isn't working?