This declaration is very confusing:
char* q {new char[1024]{}}; // q[i] becomes 0 for all
Is this a “pointer to a char array”, or an “array of char pointers”?
I think that new char[1024]{} is initializing a char array of 1024 elements each having a value of 0.
So this is the same as:
char* q = [0,0,....] // until 1024
Correct?