far and near pointer

what is wrong in the given code its not working.....
int main(void)
{
int far* p=0;
int near* q=0;
int* r=0;
printf("p:%d",sizeof(p));
printf("q:%d",sizeof(q));
printf("%d",sizeof(r));
return 0;
}
closed account (Dy7SLyTq)
i dont think there is such thing as a int far* or int near*
Smells like 16-bit Microsoft:
http://msdn.microsoft.com/en-us/library/aa984844%28v=vs.71%29.aspx

@JAI: "not working" does not explain the problem. One could think that it means: "the code compiles, program runs, output is sensible, but my salary is still limited".
Don't use near/far qualifiers. They're a hangover from DOS. They have no meaning on 32/64 bit Windows.
http://www.cplusplus.com/forum/general/12435/#msg59579
Topic archived. No new replies allowed.