I am moving some code from VS2017 on one pc to another pc with VS2019. Everything is fine excepted that I cannot use std::filesystem. In my former code, I was using C++14 and had std::experimental::filesystem. In the new code, I want to move to C++17 so I changed to std::filesystem (as shown in my code below). The weird thing is that intellisense (not sure it is the right name of the thing) shows no error. It even displays filesystem when I type std::f...
But the code won't build and give the error "namespace "std" has no member "filesystem"".
I changed C++ Language Standard to c++latest, VS2019 version is Community 16.6.5.
#include <string>
#include <iostream>
#include <filesystem>
namespace fs = std::filesystem;
int main()
{
std::string path = "C:\\";
for (const auto& entry : fs::directory_iterator(path))
std::cout << entry.path() << std::endl;
}
EDIT: The last line of my initial question might not have been clear enough: I already changed "C++ Language Standard" to C++17 or C++latest.
EDIT: As requested, the output:
Thanks to @drescherjm, we found that it is a Cuda issue. Any idea from a Cuda specialist?