Do I always have to specify absolute path for objects instantiated from std::fstream class? In other words, is there a way to specify just relative path to them
std::fstream
On linux also:
// main.cpp int main() { ifstream myFile("../Folder/readme.txt"); // ... }
Assuming the folder structure is something like this:
/usr/Douments/dev/MyProject/main.cpp /usr/Documents/dev/MyProject/Folder/readme.txt
/usr/Douments/dev/MyProject/main.cpp
/usr/Documents/dev/MyProject/Folder/readme.txt