A TCHAR is a *single* character. You need a vector of LPTSTR, each of which you will need to allocate and populate in your loop.