home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / mswindo / programm / tools / 1727 < prev    next >
Encoding:
Text File  |  1992-12-16  |  1.7 KB  |  43 lines

  1. Newsgroups: comp.os.ms-windows.programmer.tools
  2. From: chris@chrism.demon.co.uk (Chris Marriott)
  3. Path: sparky!uunet!pipex!demon!chrism.demon.co.uk!chris
  4. Subject: Re: How to implement a Linked List 
  5. Distribution: world
  6. References: <1992Dec16.062628.3410@nuscc.nus.sg>
  7. Organization: None
  8. Reply-To: chris@chrism.demon.co.uk
  9. X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
  10. Lines: 28
  11. Date: Wed, 16 Dec 1992 19:03:08 +0000
  12. Message-ID: <724532588snz@chrism.demon.co.uk>
  13. Sender: usenet@demon.co.uk
  14.  
  15. In article <1992Dec16.062628.3410@nuscc.nus.sg> shah@cherry.NoSubdomain.NoDomain writes:
  16.  
  17. >Hi there!
  18. >Does anyone out there knows how to implement a linked list for Windows using
  19. >MS C7. I know how to do it in C but in Windows it look tricky. I think I may
  20. >need to use the global heap with the GMEM_MOVEABLE flag but I not too sure
  21. >of going around  doing it. Can anyone gave me some pointer, please. Any 
  22. >source code sample is also appreciated. 
  23. >
  24. >Shahrin 
  25. >E-mail shah@iss.nus.sg
  26. >
  27.  
  28. If you're using Microsoft C7, you can implement a linked list in Windows
  29. in exactly the same way you would for DOS - just use the standard run time
  30. library "malloc" function.  If you use the large memory model (and there's
  31. no reason not to, any more), "malloc" gets mapped onto calls to a pretty
  32. good "sub-allocator".
  33.  
  34. Chris
  35. -- 
  36. --------------------------------------------------------------------------
  37. | Chris Marriott                           | chris@chrism.demon.co.uk    |
  38. | Warrington, UK                           | BIX: cmarriott              |
  39. | (Still awaiting inspiration              | CIX: cmarriott              |
  40. |  for a witty .sig .... )                 | CompuServe: 100113,1140     |
  41. --------------------------------------------------------------------------
  42.  
  43.