When starting the program I want to print the current path using current_path() ("C:\workspace\projects"). And then I want to be able to change the path to, lets say "c:\program files", so when i print again the current_path() I want to be printed "c:\program files". Something like this
int main()
{
cout << current_path() << endl; // c:\workspace\projects
aFunctionToChangePath("c:\program files");
cout << current_path() << endl; // c:\program files
}
Is there a function in the library that I am missing so I can acomplish this ?
int main()
{
cout << current_path() << '\n'; // c:\workspace\projects
current_path("c:\\program files");
cout << current_path() << '\n'; // c:\program files
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With