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