I'm wondering if in C/C++ it is better to declare a new array on each round of loops:
while(true) {
char array[255] = "";
// Hacer algo con el array ...
}
Or empty it at each turn of it:
char array[255] = "";
while(true) {
for(short i = 0; i < sizeof(array); i++) {
array[i] = 0;
}
// Hacer algo con el array...
}
By best I mean both from a performance (speed) and best practices perspective.