If I have a file like this, everything works as expected:
#include <filesystem>
#include <iostream>
int main() {
std::filesystem::path o = "C:\\Windows\\write.exe";
auto s = o.parent_path();
std::cout << s << std::endl;
}
However I would like to use a line like this if possible:
filesystem::path o = "C:\\Windows\\write.exe";
I tried this but I get an error:
// using-declaration may not name namespace 'std::filesystem'
using std::filesystem;
and error with this too:
using namespace std::filesystem;
// error: 'filesystem' has not been declared
filesystem::path o = "C:\\Windows\\write.exe";
Is it possible to do what I am attempting?