0_0_21680543_12711.cpp: In function 'int main()':
0_0_21680543_12711.cpp:6:2: error: expected primary-expression before '<' token
<span style="white-space:pre"> //char * getenv(const char *name);
^
0_0_21680543_12711.cpp:6:3: error: 'span' was not declared in this scope
<span style="white-space:pre"> //char * getenv(const char *name);
^
0_0_21680543_12711.cpp:10:3: error: expected primary-expression before '<' token
<span style="white-space:pre"> printf("\n");
^
0_0_21680543_12711.cpp:11:4: error: expected primary-expression before '<' token
<span style="white-space:pre"> printf("请输入你想要查询的环境变量:\n");
^
0_0_21680543_12711.cpp:12:4: error: expected primary-expression before '<' token
<span style="white-space:pre"> scanf("%s",envName);
^
0_0_21680543_12711.cpp:13:4: error: expected primary-expression before '<' token
<span style="white-space:pre"> printf("%s\n",getenv(envName));
^
0_0_21680543_12711.cpp:16:3: error: expected primary-expression before '<' token
<span style="white-space:pre"> printf("开始查看USER环境变量 = %s\n",getenv("USER"));
^
0_0_21680543_12711.cpp:17:3: error: expected primary-expression before '<' token
<span style="white-space:pre"> setenv("USER","SETENV1",1); //如果USER环境变量被设置过就设置
^
0_0_21680543_12711.cpp:18:2: error: expected primary-expression before '<' token
<span style="white-space:pre"> printf("设置USER环境变量完成\n");
^
0_0_21680543_12711.cpp:19:1: error: expected primary-expression before '<' token
<span style="white-space:pre"> setenv("USE","SETENV0",0); //如果没有被设置过 就设置
^
0_0_21680543_12711.cpp:20:5: error: expected primary-expression before '<' token
<span style="white-space:pre"> printf("设置USE环境变量完成\n");
^
0_0_21680543_12711.cpp:21:4: error: expected primary-expression before '<' token
<span style="white-space:pre"> printf("查看USE环境变量 = %s\n",getenv("USE"));
^
0_0_21680543_12711.cpp:24:4: error: expected primary-expression before '<' token
<span style="white-space:pre"> putenv("USER=test");
^
0_0_21680543_12711.cpp:25:2: error: expected primary-expression before '<' token
<span style="white-space:pre"> printf("设置USER环境变量完成\n");
^
0_0_21680543_12711.cpp:26:3: error: expected primary-expression before '<' token
<span style="white-space:pre"> printf("USER=%s\n",getenv("USER"));
^
0_0_21680543_12711.cpp:27:2: error: expected primary-expression before '<' token
<span style="white-space:pre">
^
0_0_21680543_12711.cpp:29:2: error: expected primary-expression before '<' token
<span style="white-space:pre"> printf("去除USER环境变量完成\n");
^
0_0_21680543_12711.cpp:30:3: error: expected primary-expression before '<' token
<span style="white-space:pre"> printf("USER=%s\n",getenv("USER"));
^
0_0_21680543_12711.cpp:31:3: error: expected primary-expression before '<' token
<span style="white-space:pre"> return 0;
^
0_0_21680543_12711.cpp:32:1: error: expected primary-expression before '<' token
<span style="white-space:pre"> }
^
|