获取当前工作目录
#include <stdio.h>
#include <unistd.h>
int main()
{
char buf[80];
getcwd(buf,sizeof(buf));
printf("current working directory: %s\n", buf);
}
获取当前工作目录
#include <stdio.h>
#include <unistd.h>
int main()
{
char buf[80];
getcwd(buf,sizeof(buf));
printf("current working directory: %s\n", buf);
}