Hi, I'm writing a program with 8 strings (from a to h) and I want to be able to edit elements, copy elements and delete elements from one string to another what not. but the only way I can think of for doing it is to have loads of loops which makes the program very ineloquent and messy.

it's a very basic chess program. the user says they want to move (for example) from g1 to f1. I have a loop that goes something like

(wm is the white move [a string with two elements, a letter and number], mp is the moving piece, a, b, ... g, h are strings of 12 elements each)

Code:
if (wm[0]=='a')
{
			
	mp=a[wm[1]-48];
	a[wm[1]-48]=' ';
}
I have one of those for a, b, c, d,e, f, g and h, but I want a loop which will do it for me. this equates the moving piece (mp) to the element number you specify in wm[1] in a. as you can see with there being 8 strings, there are a lot of (8 of) these loops. is there a way to do a for loop for string names? If I do it with a letter, it won't work cause the letter is only a sincge character, not a string.