A
alan
Hello,
can somebody help me with this self written rtrim function?
i do always get a access violation on the line where i want to
terminate the string:
str[i+1] = '\0'; why can't i acces this specific position?
void rtrim(char *str)
{
for( int i=strlen(str)-1; i>= 0; i-- )
{
if( str != ' ')
{
break;
}
}
str[i+1] = '\0';
} // function trim()
thank you in advance.
alan
can somebody help me with this self written rtrim function?
i do always get a access violation on the line where i want to
terminate the string:
str[i+1] = '\0'; why can't i acces this specific position?
void rtrim(char *str)
{
for( int i=strlen(str)-1; i>= 0; i-- )
{
if( str != ' ')
{
break;
}
}
str[i+1] = '\0';
} // function trim()
thank you in advance.
alan