2
创建代码块是不好的做法吗?
在C ++中,不好的做法是在某些函数中创建代码块,例如: bool f() { { double test = 0; test = // some other variable outside this function, for example. if (test == // some value) return true; } { double test = 0; test = // some variable outside this function, different from the last one. if (test …