|
|
Linux下获取用户主目录的方法分享
方法如下
char *path = getenv("HOME");
printf("path = %sn",path);
getenv是标准库函数,包含stdlib.h头文件就可.
|
发表留言请先登录!
|