I have an array called quint8 block[16] which I:
- initialize to zero with
block[16] = { 0 } - fill it with some data
- then pass it to a method/function as an argument like this
bool fill(const quint8 *data)
In this fill function I want to see if the array is filled completely or if it contains null elements that were not filled.
Is it correct to perform a check this way? if(!data[i])? I have seen similar Q&A on this forum but all of them use \0 or NULL and I've heard this is not a good style for doing so and that has confused me.
if(data[i] == 0).