Far pointers are a specialty of the 8086 architecture. Unless you are going to write DOS or Windows 16 programs, you won't ever need to use them. Far pointers aren't part of standard C either and do not exist on other platforms.
Answer from Link #1 is good and clear one:If does nothing unless you happen to be using a 16 bit x86 compiler.
If you look in the Win32 header WinDef.h (in Visual Studio, simply right-click the word FAR in the source and select "Go to Definition", you will see that it is a macro defined as far, which in turn is also a macro defined as nothing at all!
It is only there to allow the compilation of legacy Win16 source as Win32. In 16 bit x86 compilers, far was a compiler extension keyword to support seg::offset pointers which resolve to a 20bit address (16 bit x86 only had a 1Mb address space!). They are distinct from 16 bit near pointers which comprised only the ::offset from the current segment.
- What does Far mean in c?
- Far pointer
- difference between far and huge pointers
- What are near, far and huge pointers?
- near, far and huge pointers in C
- Far pointer in c programming
- What is meant by Near, Huge and Far Pointers in C programming
- What is the use of Far Pointer and how it works?
- C Programming dangling pointer
- What is a dangling pointer?
- Dangling, Void, Null and Wild Pointers in C++
- Dangling, Void , Null and Wild Pointer in C
- Dangling Pointer in C
- What is dangling pointer in c?
- What is Dangling Pointer with Cause and How to avoid it?
- Dangling pointer
No comments:
Post a Comment