mercredi 4 juillet 2018

In C++, 'Node' is a class, 'node' is the instance of 'Node'. Why " *node = nullptr " is wrong, but " *node = NULL" is correct?

Node* node;    
*node = nullptr;

Report an error:

error: no viable overloaded '='
       *node = nullptr;

but

Node* node;    
*node = NULL;

is correct ?

Aucun commentaire:

Enregistrer un commentaire