Hey guys!
I hope you can help me sort one thing out. Why i cannot do this?However, if i would write thisCode:char* ptr = new char[40]; ptr = "First string"; strcpy(ptr, "New string");then everything would work out and contents of ptr would change to the new string. In other words, how does function strcpy change from normal assignment. Thank you.Code:char* ptr = new char[40]; strcpy(ptr, "First string"); strcpy(ptr, "New string");