📄 putenv.cc
字号:
#include <iostream>using namespace std;#include <stdlib.h>#include <string>int main(){ string str; str = "CPP=tarena"; int r = putenv((char*)str.c_str()); if(r<0) cout << "error!" << endl; else cout << "success!" << endl; char* p = getenv("CPP"); if(p==NULL) cout << "no CPP!" << endl; else cout << p << endl;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -