cpp
void getFileName(const char* path, char* file_name)
{
const char* lastSlash = strrchr(path, '\\');
if (lastSlash != nullptr)
{
strcpy(file_name, lastSlash + 1);
}
else
{
strcpy(file_name, path);
}
}