/ Published in: C++
URL: http://en.wikibooks.org/wiki/C%2B%2B_Programming
Show Current Path
Expand |
Embed | Plain Text
#include <direct.h> #include <stdlib.h> #include <iostream.h> int main() { char CurrentPath[_MAX_PATH]; getcwd(CurrentPath, _MAX_PATH); cout << CurrentPath << endl; return 0; }
You need to login to post a comment.
