i thought of that also, as you can see with one of the lines commented out... I tried
int x = lastname.size() - 1;
also i just tried all 3 of the options you kindly provided, but none worked.
also, i posted that while i was on my phone in a rush, sorry it's in the wrong place.
should i post my whole code or something? it looks like the problem isn't with this area.