About 56 results
Open links in new tab
  1. Why are there two ways of expressing NULL in C?

    Dec 21, 2022 · Why are both of the above expressions considered semantically equivalent in the context of NULL? More specifically, why do there exist two ways of expressing the same concept rather than …

  2. What is the difference between NULL, '\0' and 0? - Stack Overflow

    The null pointer is often defined as 0, but this depends on the environment you are running in, and the specification of whatever operating system or language you are using.

  3. Correct way of defining NULL and NULL_POINTER? - Stack Overflow

    Sep 13, 2013 · As far as I know, C defines NULL like this: #define NULL ( (void *) 0) Then, how should we define NULL_POINTER ? I defined it the same in my program and it worked, but I suppose that is …

  4. c++ - How to define NULL using #define - Stack Overflow

    Jun 16, 2011 · How to define NULL using #define Asked 16 years, 2 months ago Modified 5 years, 3 months ago Viewed 12k times

  5. c++ - #define NULL NULL - Stack Overflow

    May 30, 2010 · #ifndef NULL #define NULL NULL #endif This code compiles in gcc with no warnings/errors. Can someone explain what the preprocessor is doing here?

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

    4.10 about pointer conversion says that a prvalue of type std::nullptr_t is a null pointer constant, and that an integral null pointer constant can be converted to std::nullptr_t. The opposite direction is not …

  7. Отличие 0 or NULL? Что лучше использовать?

    Oct 16, 2011 · NULL це іменована константа -- \#define NULL 0 прикладів можна навести багато-на С раніше не було логічного типу і його можна було відтворити із \#define bool int \#define true 1 …

  8. Is it safe to #define NULL nullptr? - Stack Overflow

    Jan 25, 2012 · Btw, if you're writing a C++11 implementation then it is legal for you to #define NULL nullptr, because nullptr is a null pointer constant, and NULL can be any null pointer constant.

  9. What header defines NULL in C++? - Stack Overflow

    Aug 19, 2012 · According to C++ primer, <cstdlib> header defines NULL. cpluspplus says it is defined in <cstddef>. Ultimately, if the right header is not included, I thought NULL can't be referenced.

  10. Null Set Definition, Properties & Examples - Lesson | Study.com

    In this lesson, explore null sets and learn the definition of a null set and understand its properties. Finally, discover the notations of a null set and see its examples.