How do I achieve the dynamic equivalent of this static array initialisation:
char c[2] = {}; // Sets all members to '';
In other words, create a dynamic array with all values initialised to the termination character:
char* c = new char[length]; // how do i amend this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…