C获取当前目录

获取当前工作目录

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

猜你喜欢

转载自blog.csdn.net/qq_33242956/article/details/89226966
今日推荐