In C programming, whenever I try to perform first time cat, I need to
TCHAR file_name[1024];
// Use memset or set the first byte to 0?
file_name[0] = 0;
_tcscat(file_name, TEMP_DIRECTORY_PATH);
_tcscat(file_name, file);
I see most programmers are using memset. But, for me, I just set the first byte to 0, to let _tcscat knows where to start from.
I am not sure whether there is any shortcoming / trap for doing so, instead of using memset?
Thanks.
You can just set the first char to 0.
However an even easier way would be to