I know that NULL is always 0, but why does the following code print the message?
NULL
0
#include <iostream> using namespace std; int main() { int* ptr = nullptr; if (ptr == 0) { cout << "Does it always work?"; } return 0; }
Aucun commentaire:
Enregistrer un commentaire