I should have given you one more line of code
ComboBox_GetText(GetDlgItem( hDlg, IDC_N_USERNAME), szTmpStr,
SIZE_OF_USER_NAME);
strcpy_s(szTmpStr2,72,szTmpStr);
strcat_s(szTmpStr2,72, "5"); //Make sure the strip code that follows leaves
something
while (isspace(*szTmpStr2)) szTmpStr2++; //Error 1 error C2105: '++' needs
l-value
if( !isalpha(szTmpStr2[0]))
>> I'm doing plain C
>> Can you see what is wrong with the while statement
[quoted text clipped - 11 lines]
> char *p = szTmpStr2;
> while (iswspace(*p)) p++;
Nathan Mates - 31 Jan 2007 19:16 GMT
>strcpy_s(szTmpStr2,72,szTmpStr);
>strcat_s(szTmpStr2,72, "5"); //Make sure the strip code that follows leaves
>something
>while (isspace(*szTmpStr2)) szTmpStr2++; //Error 1 error C2105: '++' needs
>l-value
Make a pointer, then ++ it. For example:
char* pStart = &szTempStr2[0];
while(isSpace(*pStart)) ++pStart;
At the end, pStart is a pointer to some memory (WITHIN szTempStr2)
that has the string minus any leading spaces. Copy that off to another
buffer if you want.
Nathan Mates
--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
Frank - 31 Jan 2007 19:27 GMT
Thanks
>>strcpy_s(szTmpStr2,72,szTmpStr);
>>strcat_s(szTmpStr2,72, "5"); //Make sure the strip code that follows
[quoted text clipped - 19 lines]
> # think. What are the facts, and to how many decimal places?" -R.A.
> Heinlein