Should Local Variable Initialisation Be Mandatory?

前端 未结 17 2442
忘掉有多难
忘掉有多难 2021-02-14 01:26

The maintenance problems that uninitialised locals cause (particularly pointers) will be obvious to anyone who has done a bit of c/c++ maintenance or enhancement, but I still se

17条回答
  •  [愿得一人]
    2021-02-14 02:05

    Performance? Nowadays? Maybe back when CPUs ran at 10mhz it did make sense, but today its hardly a problem. Always initialise them.

提交回复
热议问题