под Windows (VS 2022 Compiler), он компилирует и работает нормально < /li>
под Linux, с G ++ 8.2.2, он компиляции и выполняется в порядке < /li>
in linux, с G ++, и сбором. Время выполнения < /li>
< /ul>
ошибка Linux: < /p>
Код: Выделить всё
COPY RAISED filesystem error: Cannot convert character sequence: Invalid or incomplete multibyte or wide character
COPY FAILED
< /code>
Вот программа: < /p>
#include
#include
#include
#include
#include
#include
bool DoCopyFile( const std::wstring& sSource, const std::wstring& sDest )
{
try
{
std::error_code ec;
auto options = std::filesystem::copy_options::none;
std::filesystem::copy( sSource.c_str(), sDest.c_str(), options, ec );
if ( ec.value() == 0 )
{
return true;
}
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79640126/using-stdfilesystem-with-g-12-1-0-raises-cannot-convert-character-sequence[/url]
Мобильная версия