cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Explaination...
Explaination...
Sep 3, 2011 at 4:21am UTC
Tanuj31
(9)
#include<stdio.h>
#include<conio.h>
void main()
{
char far *s1,*s2;
printf("%d %d",sizeof(s1),sizeof(s2));
getch();
}
OUTPUT = 4 2
----> Hello, This program gives output like above mentioned. How please explain me and also explain about far pointer.
Sep 3, 2011 at 5:16am UTC
Athar
(4466)
There's no such thing as a "far pointer" in modern C (let alone C++). It is a relict from old days and nothing you need to concern yourself with. If you get that output, you have to update your compiler.
If you're interested for whatever reason, see here:
http://en.wikipedia.org/wiki/Far_pointer
or here:
http://en.wikipedia.org/wiki/Intel_Memory_Model#Pointer_sizes
Sep 3, 2011 at 8:59am UTC
helios
(17574)
Holy-
That's one ancient compiler, you got there. I'd suggest using one that is
not
from the early Neolithic.
http://www.cplusplus.com/forum/articles/7263/
Topic archived. No new replies allowed.