you cannot move the cursor around in text that was already typed in pure c++. Is that what you are trying to do? There are external libraries that can do this, if that is what you are asking (unclear).
I was told by my friend that using temp can allow my code to scroll.For example, if i input string AABBA, then the output will be AABBA scrolling to the left or right or unward and downward.
Solid information about your OS/Compiler might help provide you with more concrete information.
Perhaps you can start with
char screen[25][80];
Then you could do something like copy char board_A to say a point in screen such as 10,10.
You then draw the whole screen array to the physical screen.
Then you clear screen (both the physical screen and the in-memory array), and then copy board_A to say 10,11
You then draw the whole screen array to the physical screen, and voila, it's scrolled!.
your friend's words and your code are not matching at all. your code writes a constant block of stuff, the input is ignored, you don't use letter anywhere after you read it in.