I am trying to figure out, why my char* const
isn't new and empty?
char* const a = new char[10];
Gives me:
\r\r\r�����������
EDIT: Ran a test,
std::string text = "Hello world!";
int length = text.size();
char* const a = new char[length];
std::memset(a, '\0', length);
std::strncpy(a, s.c_str(), length); // <-- after this, the gibberish comes back.