I am trying to initialize a char* and allocate memory for a specific amount of chars (9 in this case), but when I run the program and look at the value of char* (by using a breakpoint), I can see that a lot of nullptr characters have been added (as seen in the image). Where do these characters come from? and how do I avoid having them added to the char*? (I have to use char*)
char* Text = new char[9] {'0', '0', '0', '0', '0', '0', '0', '0', '0'};
What I get from this char* is: 000000000yyyyYYY3/4\x15a\x17Y\v
Thanks a lot.