How to zero array members when my compiler isn't standard conform

前端 未结 3 1156
独厮守ぢ
独厮守ぢ 2021-01-19 05:29

My compiler (C++Builder6) syntactically allows array member initialization (at least with zero), but actually it doesn\'t really do it. So the assert in the example given be

3条回答
  •  春和景丽
    2021-01-19 06:00

    I would like to append previous posts that if you are using a character array as a string then it is enough to write in the constructor

    TT() { b[0] = '\0'; }

提交回复
热议问题