Basically, I'm trying to do this:
char x[] = "hello";char* y = new char[sizeof(x)](x); // won't work.
demo
Is there a way to do this cleanly? No comments on DO NOT USE raw arrays, or raw pointers please.
Aucun commentaire:
Enregistrer un commentaire