このコードが機能しないのはなぜですか?
wchar_t path[300];
wchar_t *PathCreator(wchar_t *dir, wchar_t *fileName)
{
int j = 0;
while(j < 300)
{
path[j] = '\0';
j++;
}
int i;
i = 0;
while(*dir != '*')
{
path[i] = *dir;
i++;
dir++;
}
wchar_t *t = fileName;
while(*t != '\0')
{
path[i] = *t;
i++;
t++;
}
path[i] = '\0';
//std::wcout << path << std::endl;
return path;
}
int _tmain(int argc, _TCHAR* argv[])
{
std::wcout << PathCreator(L"A",L"B");
}