How can I copy a char to an array?
char s[100], p[100];
in = fopen("infix.in","r");
while (fscanf(in,"%s",s) != EOF) {
for (j = 0; j < strlen(s); j++) {
if (s[j] - 48 >= 0 && s[j] - 48 <= 9) {
for (i = j; i < j + 1; i++) {
strcpy(p[i],s[j]);
}
}
}
}
turbo c said "Cannot convert 'int' to 'char*' "
This is not working. How do I solve this?