Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <direct.h>
- #include <stdlib.h>
- char* currentDirectory() {
- char* buffer;
- if((buffer = _getcwd(NULL, 0)) == NULL) {
- perror("Unable to find current directory");
- } else {
- return buffer;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment