Posted By

Panic2k6 on 08/24/06


Tagged

FileSystem


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

copyleft
oakdragon


Show Current Path


 / Published in: C++
 

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

Show Current Path

  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. }

Report this snippet  

You need to login to post a comment.