Skip to content

Commit 0aed499

Browse files
get_current_dir.cpp
1 parent a83b5cf commit 0aed499

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

get_current_dir.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include <filesystem>
2+
#include <iostream>
3+
4+
// https://stackoverflow.com/questions/875249/how-to-get-current-directory
5+
6+
int main() {
7+
std::filesystem::path cwd = std::filesystem::current_path();
8+
std::cout << "current dir: " << cwd << std::endl;
9+
return 0;
10+
}

0 commit comments

Comments
 (0)