I've been typing in the following example code from a book, which is shown in the following, demonstrating move semantics. It works up to the point where the desctructor message is output to screen, then crashes.
I could not determine what the course for this crash is, there is no other message shown than the window saying: Program has stopped working, and the logs give no indication as to where the error occurs or why.
So, my question is, what could be the source of the error? (My guess is that it has to do with strcpy (using strcpy_s does not solve the error, the program keeps crashing after call to destructor)). (Ex.: strcpy_s(name, strlen(obj.name), obj.name);)