home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19407 < prev    next >
Encoding:
Text File  |  1993-01-08  |  886 b   |  23 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!mcsun!ub4b!reks.uia.ac.be!derijkp
  3. From: derijkp@reks.uia.ac.be (Peter De Rijk)
  4. Subject: Re: Problem with Turbo-C: calculating with pointers
  5. Message-ID: <1993Jan8.092828.21529@reks.uia.ac.be>
  6. Organization: U.I.A.
  7. X-Newsreader: Tin 1.1 PL5
  8. References: <C0HrCx.12F@constellation.ecn.uoknor.edu>
  9. Date: Fri, 8 Jan 1993 09:28:28 GMT
  10. Lines: 11
  11.  
  12. Norman Lin (norlin@prowler.ecn.uoknor.edu) wrote:
  13. : In the "huge" memory model in Turbo C++, all pointers default to "far"
  14. : pointers.  Far pointers, it says in the TC++ manual, should not be used
  15. : for pointer arithmetic because they are not segment aligned.  Declare the
  16. : pointers to be huge pointers (e.g. char huge *begin, huge *end), and the
  17. : math should work, because huge pointers are segment aligned.
  18.  
  19. This is indeed the solution to the problem. Many thanks to all people who
  20. responded. 
  21.  
  22. Peter
  23.