Home > Back-end >  11 c smart Pointers from memcpy cannot use?
11 c smart Pointers from memcpy cannot use?

Time:10-24

 
From & lt; char> P=new char (100);
Char * p2=new char [100];
Memcpy (p - & gt; The get (), p2, 100);

CodePudding user response:

,,,=new char [100].
New char (100) referred to in his memory is only one byte long, you copy the error 100 sure
  • Related