I have no problems connecting strings but if I follow the same procedure for chars then the program blows.
void Input_Code(char *d1_p, char *d2_p, char *d3_p, char *d4_p, char *d5_p,
char *d6_p, char *d7_p, char *d8_p, char *d9_p, char *d10_p, char *full_code_p)
{
char buffer[12];
printf("Please enter 10 character account code: ");
fgets(buffer, sizeof buffer, stdin);
sscanf(buffer, "%c%c%c%c%c%c%c%c%c%c",
d1_p,d2_p,d3_p,d4_p,d5_p,d6_p,d7_p,d8_p,d9_p,d10_p);
strcpy(full_code_p, d1_p);
strcat(full_code_p, d2_p);
strcat(full_code_p, d3_p);
strcat(full_code_p, d4_p);
strcat(full_code_p, d5_p);
strcat(full_code_p, d6_p);
strcat(full_code_p, d7_p);
strcat(full_code_p, d8_p);
strcat(full_code_p, d9_p);
strcat(full_code_p, d10_p);
}
I just need to connect all 10 characters into one string.