Closed gcarreno closed 1 year ago
Testing this PR, std::current_path() is not identified as a valid member for std.
Hey @Aniseto,
std::current_path() is not identified as a valid member for std.
You are completely correct, current_path()
does not belong on the std
namespace.
If you look closely at the message on the PR, the one at the top there :arrow_up:, you'll notice that it belongs to std::filesystem
for which I've created an alias called fs
.
So in order to use it you just have to do something like this:
std::string filename = fs::current_path() / "data" / "sumario.psk";
And then use that variable to send to the reader function.
Hope that helps!
Cheers, Gus
The issue is that compiler says:
About this line: std::string outputDir = fs::current_path() / "";
Error (active) E0312 no suitable user-defined conversion from "std::filesystem::path" to "std::string" exists NosoWalletCPP
std::string outputDir = fs::current_path().string() / "";
Hey @Aniseto,
Wow, that's quite odd!!
I tested that on my Linux box with g++
and it worked.
But I did wonder why because the docs did say that current_path()
returned path
.
I was a bit in a hurry and forgot that it std::filesystem::path
so I tried std::string
and it worked on my end.
Let me update the PR to reflect this change.
Cheers, Gus
Hey @Aniseto,
Looks like fs::path
has a function that returns a string.
I made the necessary changes to always have a path return a string. Please review them and see if it works on your side now.
Cheers, Gus
Solved path issue, changing from wxString to std::String. Not needed to merge.
Hey @Aniseto,
I've fixed the path issues with
data/sumary.psk
.I've added:
and made some adjustments with the type of container for the path. From
wxString
tostd::string
which is whatcurrent_path()
returns, I think...Cheers, Gus