home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!dynsim1!mbb
- From: mbb@litwin.com (Mark Beyleveld)
- Subject: testing for null pointer
- Message-ID: <1992Dec28.181916.7484@litwin.com>
- Organization: Litwin Process Automation
- Date: Mon, 28 Dec 1992 18:19:16 GMT
- Lines: 22
-
- Assuming I declare
-
- int* aPointer = 0;
-
- is it valid to write
-
- if (aPointer) {...}
-
- or must I write
-
- if (aPointer != 0) {...}
-
- Also, are the rules for pointers to member functions the same?
-
- ---------------------------------------------------------------------
- Mark Beyleveld
- Litwin Process Automation
- mbb@dynsim1.litwin.com
- --
- ---------------------------------------------------------------------
- Mark Beyleveld
- Litwin Process Automation
-