char * msg = new char[65546];
want to initialize to 0 for all of them. what is the best way to do this in C++?
You can use a for loop. but don't forget the last char must be a null character !
char * msg = new char[65546]; for(int i=0;i<65545;i++) { msg[i]='0'; } msg[65545]='\0';