is it good or bad to reuse the variables?

后端 未结 9 1987
灰色年华
灰色年华 2020-12-17 15:03

I wonder if it is good or bad (or does not matter) if I reuse the variable names as much as possible? for example

int main(void){
  //...
  int x=0;

  //..
         


        
9条回答
  •  有刺的猬
    2020-12-17 15:26

    Put it this way - how would you like it if I wrote a big pile of undocumented, complex code in such a way and, then, you get the job of maintaining/enhancing it.

    Please do not do such a thing, ever :)

提交回复
热议问题