C# C系统(“echo$HOME”);想要$HOME指向什么
C语言编程:希望在系统命令中使用特殊字符。 系统(“echo$HOME”); 想要$HOME系统变量,而不是文字$HOME。 谢谢 基思C# C系统(“echo$HOME”);想要$HOME指向什么,c#,system,C#,System,C语言编程:希望在系统命令中使用特殊字符。 系统(“echo$HOME”); 想要$HOME系统变量,而不是文字$HOME。 谢谢 基思#包括//for printf() #包含//用于getenv() int main() { 查尔*家; 主页=getenv(“主页”); printf(“值为=%s\n”,主页); } c和c#不是一回事 #include <stdio.h> // for printf() #include <stdlib.h> // for get
#包括//for printf()
#包含//用于getenv()
int main()
{
查尔*家;
主页=getenv(“主页”);
printf(“值为=%s\n”,主页);
}
c和c#不是一回事
#include <stdio.h> // for printf()
#include <stdlib.h> // for getenv()
int main()
{
char *home;
home = getenv("HOME");
printf("Value is = %s\n", home);
}