尝试在安装ubuntu 14的EC2实例上将此行#pragma once
using namespace std;
class A {
public:
double c;
struct Controller {
Controller(double& input) : c(input) {}
double& c;
double fire () { return c * 2};
};
Controller control(c);
A();
};
添加到-bash: /etc/hosts: Permission denied
时出现错误127.0.0.1 ip-10-0-0-1
。
我正在运行的命令是/etc/hosts
请注意,我可以通过sudo echo "127.0.0.1 ip-10-0-1-100" >> /etc/hosts
手动添加该行,但是我想在shell脚本中执行它。