implementing far pointers in Visual C++ 4.0

limin123
limin123 used Ask the Experts™
on
In Borland C, there is a function farcalloc that allocates far pointers.
Is there such a function in Visual C++ 4.0?
Or is there any other way to implement far pointers uin Visual C++ 4.0? (I need to implement a dynamic array of size greater than 64K using pointers.)
Thanx.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Win32 does not distinct a near pointer and a far pointer (and a huge pointer). All the pointers in Win32 are 32-bit (4 bytes) long. Since Visual C++ 4.0 is used to develop Win32 applications, you don't need to worry about it. Just allocate a memory area dynamically and use it as usual.

Author

Commented:
There is no calloc function in C Run-Time Library. It should be malloc and free. You can also use C++ operator new and delete. You may also use Win32 functions GlobalAlloc and GlobalFree.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial