Listing 3 Compilation error with GetLBText()
class PopulateHelper { template <typename T> void fill(T &ctrl, std::vector<std::string> &strs) { ctrl.ResetContent(); for (int ii=0; ii<strs.size(); ++ii) ctrl.AddString(strs[ii]); } template <typename T> CString getData(T &ctrl, int iIndex) { CString data; ctrl.GetLBText(iIndex, data); // oops, this won't work! return data; } };