Как преобразовать из std::string в LPCTSRT
Данный метод должен будет проходить по всем файлам на диске и делать "что-то". Принимает он вектор строк который будет заполнен путями до файла и LPCTSTR в котором хранится буква диска(типо C:/ , D:/ итд) но метод file.path().sting() возвращает std::string как преобразовать его в LPCTSTR
void get_files(std::vector<std::string>& paths, LPCTSTR& root_path)
{
CStringA stringA(root_path);
const char* const_char_root_path = stringA;
char* char_root_path = const_cast<char*>(const_char_root_path);
for (const auto& file : filesystem::directory_iterator(char_root_path))
{
if (filesystem::is_directory(file))
{
//get_files(paths, file.path().sting());
}
else
{
paths.push_back(file.path().string());
}
}
}