Why are you not just using strData.at() or strData[pos]? Seems like silly micro optim (one that would break down hard if you modify strData at any point).