Show Current Path


/ Published in: C++
Save to your folder(s)

Show Current Path


Copy this code and paste it in your HTML
  1. #include <direct.h>
  2. #include <stdlib.h>
  3. #include <iostream.h>
  4.  
  5. int main()
  6. {
  7. char CurrentPath[_MAX_PATH];
  8. getcwd(CurrentPath, _MAX_PATH);
  9. cout << CurrentPath << endl;
  10.  
  11. return 0;
  12. }

URL: http://en.wikibooks.org/wiki/C%2B%2B_Programming

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.