Solved

implementing far pointers in Visual C++ 4.0

Posted on 1997-11-30
2
558 Views
Last Modified: 2006-11-17
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.
0
Comment
Question by:limin123
2 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 1174449
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.
0
 
LVL 1

Author Comment

by:limin123
ID: 1174450
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.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now