+ 1

Can anyone please explain me the difference between New operator and Constructor ?

21st May 2019, 4:10 AM
Prashant Gurung
Prashant Gurung - avatar
4 Antworten
+ 14
Np 🤗🤗
21st May 2019, 5:26 PM
Tushar
Tushar - avatar
+ 13
New operator is used to dynamically allocate memory within our program. Constructor is used to initialize data members of the class.It get invoke when an object of the class is created. 👍🏻👍🏻👍🏻
21st May 2019, 5:27 AM
Tushar
Tushar - avatar
+ 2
Thank you very much for the explaination.
21st May 2019, 5:17 PM
Prashant Gurung
Prashant Gurung - avatar