4 ms·
Note that in this case, what's actually happening is a null reference is being created; while this is very ugly (C++ references should never be null), if the re
by tokenrove 12y ago
Note that in this case, what's actually happening is a null reference is being created; while this is very ugly (C++ references should never be null), if the reference isn't used, as the author asserts, a null dereference never happens (otherwise, there would almost inevitably be a crash). Behind the scenes it's just a NULL pointer being passed to the function that apparently ignores it.
- sharth 12y agoBut either way, the code is not well-formed. A null reference should never exist in a well-formed program. http://stackoverflow.com/questions/4364536/c-null-reference http://stackoverflow.com/questions/4364536/c-null-reference