How do I achieve the dynamic equivalent of this static array initialisation:
char c[2] = {}; // Sets all members to \'\\0\';
In other word
No internal means, AFAIK. Use this: memset(c, 0, length);
you have to initialize it "by hand" :
char* c = new char[length];
for(int i = 0;i<length;i++)
c[i]='\0';
char* c = new char[length]();
and the implicit comment by many posters => Dont use arrays, use vectors. All of the benefits of arrays with none of the downsides. PLus you get lots of other goodies
If you dont know STL, read Josuttis The C++ standard library and meyers effective STL