CPP OOP class property
Programming / cpp / learn cpp
| const std::string& getName() const { return name_; }
void setName(std::string name) { name_ = std::move(name); }
|
| struct Point {
private:
int x_ = 0;
public:
inline int x() const { return x_; }
inline void x(int value) { x_ = value; }
};
|