This is the correct way of placing "file.conf"
after the initial character:
strcat(&FileConfPath[1], "file.conf");
FileConfPath[1]
is the character at index one; &FileConfPath[1]
is the address of the character at index one, which is what you want to pass to strcat
.
Note that if you want to place "file.conf"
after the slash, you want to use the address of the character after the slash, i.e.
strcpy(pos+1, "file.conf");
It goes without saying that pos+11
(one for the slash plus one for null terminator plus nine for the characters of "file.conf"
) needs to be less than or equal to &FileConfPath[255]
to avoid buffer overrun.