Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CString::Left problems ...

Status
Not open for further replies.

daniloa

Programmer
Nov 23, 2001
27
BR
Hi people good night ...

I'm with a problem using the Left function of a CString object ...

it's like this :

CString snum(_T(pnum));
CString tmp;

tmp = sNum.Mid(tmppos, pGrupo);
if (tmp.Left(4) == "0000") Zeros(pCanal, 4);
if (tmp.Left(3) == "000") Zeros(pCanal, 3);
if (tmp.Left(2) == "00") Zeros(pCanal, 2);
if (tmp.Left(1) == "0") Zeros(pCanal, 1);

but the program does never entry on any if statement and in sometimes tmp values {"00"} or {"01"}, I already tried:

if (tmp.Left(4) == _T("0000")) Zeros(pCanal, 4);

but no work too.

Someone could help me ???

Very Thanks ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top