I'm trying to define dynamic array using "new".
 
Char *str = "Hello World";
Char *newstr = new char[strlen(str)];
 
Cout<<strlen(str)<<endl;
Cout<<strlen(newstr)<<endl;
 
Strlen(str) = 11;
Strlen(newstr) = 3;
 
Why is it only 3? What is wrong? Can somebody help me with this? 
 
Thank you 
 
CK

[Non-text portions of this message have been removed]

Reply via email to