ofstream outfile(sCheckInfoSavePath); for (int i=0;i<vecStrPrompt.size();i++) { outfile << (CStringA)(LPCTSTR)(vecStrPrompt[i]) << endl; } outfile.close();