home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 16017 < prev    next >
Encoding:
Text File  |  1992-11-10  |  1.8 KB  |  42 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!mcsun!news.funet.fi!network.jyu.fi!sakkinen
  3. From: sakkinen@jyu.fi (Markku Sakkinen)
  4. Subject: Re: Explanation for "Null pointer assignment"
  5. Message-ID: <1992Nov10.065639.5452@jyu.fi>
  6. Organization: University of Jyvaskyla, Finland
  7. References: <Bww82p.HIw@peora.sdc.ccur.com> <541@ulogic.UUCP>
  8. Date: Tue, 10 Nov 1992 06:56:39 GMT
  9. Lines: 31
  10.  
  11. In article <541@ulogic.UUCP> hartman@ulogic.UUCP (Richard M. Hartman) writes:
  12. >In article <Bww82p.HIw@peora.sdc.ccur.com> tran@peora.sdc.ccur.com (Nhan Tran) writes:
  13. >>
  14. >>I am using Borland C++ 2.0. When my program finish, it has a run-time error
  15. >>message "Null pointer assignment". According to the manual, 
  16. >>
  17. >>    "Null pointer assignment" is displayed to inform you that
  18. >>    (most likely) a value was stored to an uninitialized pointer.
  19.                                   ^^^^^^^^^^^^^^^^^^
  20. >>    The program may appear to work properly in all other respects;
  21. >>    however, this is a serious bug ...
  22. >>
  23. >>I am puzzled by this. If I declare a pointer without initialzing it, then 
  24. >>the program will assign some value to that pointer (by using it) at run-time.
  25. >
  26. >I read the other answers you got, and noone actually seemed to directly
  27. >address your question about "the program will assign...", so here goes.
  28. > [good explanation deleted]
  29.  
  30. The original explanation in the manual (above) was extremely incorrect
  31. and misleading.  No wonder the person got puzzled.
  32.  
  33. ----------------------------------------------------------------------
  34. Markku Sakkinen (sakkinen@jytko.jyu.fi)
  35.        SAKKINEN@FINJYU.bitnet (alternative network address)
  36. Department of Computer Science and Information Systems
  37. University of Jyvaskyla (a's with umlauts)
  38. PL 35
  39. SF-40351 Jyvaskyla (umlauts again)
  40. Finland
  41. ----------------------------------------------------------------------
  42.