H
Hilary Cotter
I'm trying to replace the characters in a pointer from an url string.
Here is my code.
// string has embedded '+', this code will not work.
VOID PatchQuery(char *szQuery, char **ppszPatchedQuery)
{
char *p = szQuery;
while (*p++)
{
if (*p == '+') //replace '+' by ' '
*p = ' ';
}
strcpy(begin,p);
*ppszPatchedQuery =begin;
return;
}
I get an access violation when I try to replace the + with a space.
Can anyone tell me how to do this?
TIA
Here is my code.
// string has embedded '+', this code will not work.
VOID PatchQuery(char *szQuery, char **ppszPatchedQuery)
{
char *p = szQuery;
while (*p++)
{
if (*p == '+') //replace '+' by ' '
*p = ' ';
}
strcpy(begin,p);
*ppszPatchedQuery =begin;
return;
}
I get an access violation when I try to replace the + with a space.
Can anyone tell me how to do this?
TIA