About 22,400 results
Open links in new tab
  1. nullptr, the pointer literal (since C++11) - cppreference.com

    Aug 12, 2024 · There exist implicit conversions from nullptr to null pointer value of any pointer type and any pointer to member type. Similar conversions exist for any null pointer constant, which includes …

  2. What is the nullptr keyword, and why is it better than NULL?

    The new C++09 nullptr keyword designates an rvalue constant that serves as a universal null pointer literal, replacing the buggy and weakly-typed literal 0 and the infamous NULL macro. nullptr thus puts …

  3. Understanding nullptr in C++ - GeeksforGeeks

    Apr 5, 2024 · How does nullptr solve the problem? In the above program, if we replace NULL with nullptr, we get the output as "fun (char *)". nullptr is a keyword that can be used at all places where …

  4. nullptr | Microsoft Learn

    Aug 3, 2021 · The nullptr keyword specifies a null pointer constant of type std::nullptr_t, which is convertible to any raw pointer type. Although you can use the keyword nullptr without including any …

  5. 12.8 — Null pointers – Learn C++ - LearnCpp.com

    Feb 5, 2025 · Much like the keywords true and false represent Boolean literal values, the nullptr keyword represents a null pointer literal. We can use nullptr to explicitly initialize or assign a pointer a null value.

  6. C++ (C Plus Plus) | Pointers | nullptr | Codecademy

    Nov 20, 2024 · The nullptr keyword in C++ represents a null pointer, ensuring type safety and clarity in pointer operations. Introduced in C++11, it replaces the traditional NULL macro and eliminates …

  7. nullptr | C++ Programming Language

    There exist implicit conversions from nullptr to null pointer value of any pointer type and any pointer to member type. Similar conversions exist for any null pointer constant, which includes values of type …

  8. Predefined null pointer constant (since C23) - cppreference.net

    Syntax ... Explanation The keyword nullptr denotes a predefined null pointer constant. It is a non-lvalue of type nullptr_t . nullptr can be converted to a pointer types or bool , where the result is the null …

  9. nullptr in C++ - Online Tutorials Library

    The nullptr keyword in C++ represents a null pointer value which was earlier represented using NULL or 0. It was introduced in C++11 and is of type std::nullptr_t. The nullptr is a type-safe pointer that is …

  10. nullptr, the pointer literal - cppreference.com

    The keyword nullptr denotes the pointer literal. It is a prvalue of type std::nullptr_t. There exist implicit conversions from nullptr to null pointer value of any pointer type and any pointer to member type. …