I have a 200-elements-long char array, I load the vector with new characters in a loop, and
at each cycle the element number can be different from the previous one, so how can I empty the unwanted position of the array?
Note: the element size have to be of 200 and I can’t resolve the problem creating a new instance of the object with new.
Thanks
Do you mean something like:
? Of course, that will just overwrite the rest of the array with U+0000 values… there’s no such thing as a
char[]element being “empty”. There will always be acharat every element in the array; U+0000 is one way of indicating “don’t treat this as real data”.