0

What is issue in this copy constructor

Hi Refer code below: https://code.sololearn.com/c5H66D54uUV1 Why there is memory issue in this code? What am I missing here? And why i cannot use strcpy_s on sololearn?

30th Apr 2022, 7:47 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
1 Antwort
+ 1
I think, p2 is local reference variable, not a dynamic memory allocated one so no need to delete..
30th Apr 2022, 8:15 PM
Jayakrishna 🇮🇳