c&c++获取当前目录
#include <iostream> #include<stdio.h> #include <direct.h> #define MAXPATH 1024 using namespace std; int main(int argc, char* argv) { char buf[80]; char * ret =_getcwd(buf, sizeof(buf)); printf("current working directory: %s\n", buf);
#include <iostream> #include<stdio.h> #include <direct.h> #define MAXPATH 1024 using namespace std; int main(int argc, char* argv) { char buf[80]; char * ret =_getcwd(buf, sizeof(buf)); printf("current working directory: %s\n", buf);