warning: uninitialized variable //But I have initialized ! C++ Compiler bug?

后端 未结 5 1221
夕颜
夕颜 2021-01-05 13:56

Iam trying to compile this program but i get warning and when i run vc++ 2010 debugger pops up : ( Here is my code :

#include 
using namespa         


        
5条回答
  •  春和景丽
    2021-01-05 14:33

    Suppose the entire array you pass in is 0. Both loops short-circuit and never execute, both minn and index are uninitialized.

    Now if this happens, what should be happening? Set the variables to the values that accomplish just that.

提交回复
热议问题