Skip to content

Instantly share code, notes, and snippets.

@mshafae
Last active October 20, 2022 00:43
Show Gist options
  • Save mshafae/fba16c441b459231d6fc5d2e35d046aa to your computer and use it in GitHub Desktop.
Save mshafae/fba16c441b459231d6fc5d2e35d046aa to your computer and use it in GitHub Desktop.
CPSC 120 Program that mimics the command pwd.
// Gist https://gist.github.com/fba16c441b459231d6fc5d2e35d046aa
#include <filesystem>
#include <iostream>
int main(int argc, char const *argv[]) {
// works just like `pwd`
std::cout << std::filesystem::current_path().string() << "\n";
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment