Hi all,
I created a function that skips past white spaces in a string:
I know it works, but when I call it nothing happens:Code:VOID SkipSpaces(LPSTR lpszString) { while(isspace(*lpszString)) { lpszString ++; } }
I think it might be a problem with pointers:Code:LPSTR lpszBuffer = " Hello World"; SkipSpaces(lpszBuffer); printf(lpszBuffer); // lpszBuffer still equals " Hello World" // it should equal "Hello World"
lpszString ++;
Does anybody know what the problem may be?




Reply With Quote