Try it :) :
#define MAX_PATH 256
#define ROOT_DIR "C:\\ABC\\"
{
char szPathedFileName[MAX_PATH] = {0};
sprintf(szPathedFileName, "%s%s", ROOT_DIR, "test.txt");
...
}
{
char szPathedFileName[MAX_PATH] = {0};
strcat(szPathedFileName, ROOT_DIR);
strcat(szPathedFileName, "test.txt");
...
}
When you will get any compiler errors here -
please see the secure replcement with:
strcpy_s
and
sprintf_s
:)