1 2 3 4 5 6 7 8 9 10 11#include <iostream> int main() { int* ptr = nullptr; // 'ptr' is a null pointer if (ptr == nullptr) { std::cout << "ptr is null." << std::endl; } return 0; }
1 2 3 4 5 6 7 8 9 10 11
#include <iostream> int main() { int* ptr = nullptr; // 'ptr' is a null pointer if (ptr == nullptr) { std::cout << "ptr is null." << std::endl; } return 0; }