i'm trying copy a string to another and adding space between the names
but it show a warning c4700
and i don't know why???
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char *convert(char *string)
{
char *p=string;
char *tmp;
while (*string==' ')string++;
while (*string)
{
*tmp++=*string++;
while(*string >= 'a' && *string <='z')
*tmp++=*string++;
strcat(tmp,"D");
tmp++;
}
return p;
}
void main()
{
char name[]="SasonSasoniBenSason";
char*str=convert(name);
printf("%s",str);
}