0

what's the difference between new int and NULLL?

15th Jul 2016, 7:12 AM
Andrei Alekseev
3 Antworten
+ 1
new int allicates dynamic memory to heap and null is basically used to indicate or assign null value (that is an empty value) to any variable.
15th Jul 2016, 8:54 AM
SIDDHARTH VASU
SIDDHARTH VASU - avatar
0
Also, you cannot dereference a pointer that points to NULL or nullptr (since C++11).
15th Jul 2016, 9:14 AM
this->getName()
0
correction to the question...it is a 'NULL' with two 'l' s
15th Jul 2016, 2:01 PM
Mukul Kumar
Mukul Kumar - avatar