将“类”更改为“结构”

问题描述

|                                                                                                                       

解决方法

        很难理解您的问题到底是什么。 C ++中的“ 0”与“ 1”相同,除了默认情况下成员是“ 2”而不是“ 3”。 如果您有一个
struct
,并且想要使其成为
class
,则可以这样进行:
struct Thing {
  // ...
};

// Change this to:
class Thing {
public:
  // ...
};
或者反过来,从
class
struct
class Thing {
  // ...
};

// Change this to:
struct Thing {
private:
  // ...
};
但是,我看不出哪一种比另一种“更具可读性”。     ,        将类更改为struct =
1) Find a \"Find and Replace\" button in your IDE or text editor
2) In Find What field enter class
3) In Replace With field enter struct
4) click Replace All 
是的,这是一个糟糕的答案,但问题也是:)