convserion problem

Ambitious contributor
23Dec2009,15:50   #1
answerme's Avatar
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
Contributor
25Dec2009,03:08   #2
Gene Poole's Avatar
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?