What is NULL?
I see a lot of values set to "NULL" ("SetTouch(NULL);", "m_pGoalEnt = NULL;") in the game's code.
What is NULL equal to? |
Re: What is NULL?
Equal to 0. Mostly used as a null pointer (C++ has typesafe nullptr for this).
|
Re: What is NULL?
No, 0 don't is equal null. 0 is a integer number, null is nothing.
if ($test == null) // equal nothing if ($test == 0) // equal integer if (0 == null) // bool false |
Re: What is NULL?
Quote:
KliPPy is right it's defined like that Code:
#define NULL 0
Spoiler
|
Re: What is NULL?
Oh, if he's referring to a language and not in general, all right. But it's worth pointing out even so not all languages that identify zero as a null. Anyway... the question is about C++ only, so my topic is off.
|
Re: What is NULL?
Quote:
|
Re: What is NULL?
Exactly that, with is quote I was referencing the PHP.
|
Re: What is NULL?
Quote:
|
Re: What is NULL?
Hmm? Why you say that?
|
| All times are GMT -4. The time now is 22:59. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.