home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / cplus / 20111 < prev    next >
Encoding:
Internet Message Format  |  1993-01-29  |  1.1 KB

  1. Path: sparky!uunet!olivea!charnel!rat!usc!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!yale!mintaka.lcs.mit.edu!ai-lab!hal.gnu.ai.mit.edu!bobs
  2. From: bobs@hal.gnu.ai.mit.edu (Bob Sutton)
  3. Newsgroups: comp.lang.c++
  4. Subject: C++ problem
  5. Message-ID: <1k86v3INNjsm@life.ai.mit.edu>
  6. Date: 28 Jan 93 08:53:55 GMT
  7. Organization: /etc/organization
  8. Lines: 22
  9. NNTP-Posting-Host: hal.ai.mit.edu
  10.  
  11. I could use a bit of help with a C++ program I've been working on.  This 
  12. problem has been crashing my PC.  I have traced it to one line of code.
  13. However, I'm puzzled as to the reason why this line is bad.
  14.  
  15. Given the following declaration:
  16.  
  17.     Window **WindowList;
  18.  
  19. where 'Window' is a C++ class, shouldn't 
  20.  
  21.     WindowList=(new Window **) [n];
  22.  
  23. allocate off the heap an array of n (Window *) pointers? Apparently, 
  24. Turbo C++ isn't doing this. 
  25.  
  26. Any help would be appreciated via email.
  27.  
  28. -- 
  29. Bob Sutton                        Love, most bitterly and fiercely oppresses
  30. bobs@gnu.ai.mit.edu          those who fight it than those who offer
  31. al876@cleveland.freenet.edu       their servitude.    -- Ovid, "Amores". 
  32. rsutton@eis.calstate.edu
  33.