convserion problem

answerme's Avatar, Join Date: Dec 2007
Ambitious contributor
Hi All
I am getting a error
Code:

strLstItem.Format("%f", latitude);
//objLstCtrl.SetItemText(nItem, 2, strLstItem);
 objLstCtrl.SetItemText(nItem, 2, latitude);

error C2664: 'CListCtrl::SetItemText' : cannot convert parameter 3 from 'double' to 'LPCTSTR'
Can anyone solve
Gene Poole's Avatar, Join Date: Nov 2009
Contributor
I'm assuming "latiutude" is type float, "strLstItem" is a CString, "objLstCtrl" is a CListCtrl, and UNICODE is off. Given that, you should be calling SetItemText as in your commented out piece. Why is it commented out?