How can I declare and define multiple variables in one line using C++?

后端 未结 10 1709
抹茶落季
抹茶落季 2020-11-27 11:09

I always though that if I declare these three variables that they will all have the value 0

int column, row, index = 0;

Bu

10条回答
  •  一生所求
    2020-11-27 11:40

    When you declare a variable without initializing it, a random number from memory is selected and the variable is initialized to that value.

提交回复
热议问题