Issue with loops

My code runs and does the comparison and appending correctly

Until you fix all of the problems PaulS identified for you and make mName a char array (maybe 16 bytes?), I don't think that's a true statement.