上週習題
- 除了手動測試外,有沒有更聰明一點的方式,可以幫你找到程式碼中,
未看先猜未初始化就使用的可能錯誤?
參考解答
==22043== Conditional jump or move depends on uninitialised value(s)
==22043== at 0x539AF90: vfprintf (vfprintf.c:1655)
==22043== by 0x53A1FF8: printf (printf.c:34)
==22043== by 0x400982: bar() (main.cpp:33)
==22043== by 0x400A1C: main (main.cpp:48)
==22043==