我的 C++ style

时间:2024-01-21 11:33:09
 int g_tennis;    // not use as possible

 int make_world() {
int size = ; return size;
} const int NUMBER = ; enum Color {
RED,
GREEN
}; typedef int Dog; class MyClass {
public:
MyClass(int s, int num_entries = )
: size(s), num_entries_(num_entries), length_() {
int book = NUMBER;
book = ;
} int size; // same as data member
int num_entries() const {
return num_entries_;
} void set_num_entries(int num_entries) {
num_entries_ = num_entries;
} // private and protected name end with underline
private:
int num_entries_; void foo_(double world) {
double *pworld = &world;
pworld = nullptr;
} protected:
int length_;
}; int main() { return ;
}