📅  最后修改于: 2022-03-11 14:44:48.606000             🧑  作者: Mango
代码示例1
struct foo {
int bar;
foo() : bar(3) {} //look, a constructor
int getBar()
{
return bar;
}
};
foo f;
int y = f.getBar(); // y is 3