Linux下获取用户主目录的方法分享
方法如下
char *path = getenv("HOME");
printf("path = %sn",path);
getenv是标准库函数,包含stdlib.h头文件就可.
手机看新闻
网站客服
法定工作日
8:30-17:30
微信扫描关注