修改用户名
c++获取当前系统用户名
#include <cstdlib>
#include <iostream>
int main()
{
std::string current_user = std::getenv("USER");
std::cout << "Current user: " << current_user << std::endl;
return 0;
}
#include <cstdlib>
#include <iostream>
int main()
{
std::string current_user = std::getenv("USER");
std::cout << "Current user: " << current_user << std::endl;
return 0;
}