I've written a code to remove special chars from string. But, getting the exception as written in the heading. Using VS2012.. Any solutions?
void remover(char *input)
{
int j = 0;
char *temp = (char *) malloc(sizeof(char)*strlen(input));
for(int i = 0 ; input[i] != '\0' ; i++)
{
if(isalpha(input[i]) || isdigit(input[i]))
{
*temp[j] = *input[i];
j++;
}
}
*temp[j] = '\0';
for(j = 0 ; temp[j] != '\0' ; j++)
*input[j] = *temp[j]; // exception here
*input[j] = '\0';
//free(temp);
}