Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 26-09-2008, 12:18 PM   #1 (permalink)
XLr8
 
arpanmukherjee1's Avatar
 
Join Date: Sep 2008
Posts: 637
Default pointers


hi there

can sb tell me how to use near and far pointers in c/c++
arpanmukherjee1 is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 26-09-2008, 01:02 PM   #2 (permalink)
CAFEBABE
 
chandru.in's Avatar
 
Join Date: Mar 2008
Location: Bangalore
Posts: 474
Default Re: pointers

Standard C really has no such thing. It is an addition done in compilers targeting 8086 CPUs. There really is little need to use it today unless you are using dinosaur C compilers like Turbo C/C++.

Near pointers - Pointers to memory within same segment and thus has only offset.
Far pointers - Pointers to memory within another segment and thus contains both segment selector and offset.
__________________
Chandru

http://tuxychandru.blogspot.com
chandru.in is offline  
Old 06-10-2008, 02:06 PM   #3 (permalink)
In The Zone
 
Chetan1991's Avatar
 
Join Date: Jan 2007
Location: Shimla
Posts: 285
Default Re: pointers

Hey chandru do you mean pointers are obslete nowadays??
I have the book "Let us C" 5th ed. and the author seems to emphasise a lot on pointers as if they are very important. So wh did he stressed so much if they are obselete???
Chetan1991 is offline  
Old 06-10-2008, 02:45 PM   #4 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,658
Default Re: pointers

He meant the near and far pointer concepts are obsolete now. Pointers are essential, and will never be removed from C/C++.
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Old 06-10-2008, 03:00 PM   #5 (permalink)
CAFEBABE
 
chandru.in's Avatar
 
Join Date: Mar 2008
Location: Bangalore
Posts: 474
Default Re: pointers

Exactly. I meant only about the idea of near and far pointers. Pointers themselves will no become obsolete any time soon.
__________________
Chandru

http://tuxychandru.blogspot.com
chandru.in is offline  
Old 11-10-2008, 01:25 PM   #6 (permalink)
In The Zone
 
Chetan1991's Avatar
 
Join Date: Jan 2007
Location: Shimla
Posts: 285
Default Re: pointers

what are near and far pointers??
Chetan1991 is offline  
Old 11-10-2008, 01:29 PM   #7 (permalink)
CAFEBABE
 
chandru.in's Avatar
 
Join Date: Mar 2008
Location: Bangalore
Posts: 474
Default Re: pointers

^^ See my first reply.
__________________
Chandru

http://tuxychandru.blogspot.com
chandru.in is offline  
Old 11-10-2008, 01:33 PM   #8 (permalink)
Section Moderator
 
gopi_vbboy's Avatar
 
Join Date: Mar 2007
Location: Hyderabad
Posts: 1,186
Default Re: pointers

u don't generally use near and far pointers in c++.
gopi_vbboy is online now  
Old 11-10-2008, 07:32 PM   #9 (permalink)
Legen-wait for it-dary!
 
dheeraj_kumar's Avatar
 
Join Date: Dec 2004
Location: Chennai
Posts: 2,471
Default Re: pointers

Near uses 2 bytes, and Far uses 5 bytes, AFAIK.
__________________
If the Start Windows Restart when Windows starts check box is checked Windows Restart will start automatically every time Windows is started. - Actual excerpt from a windows program help file
dheeraj_kumar is offline  
Old 11-10-2008, 09:26 PM   #10 (permalink)
Back!
 
red_devil's Avatar
 
Join Date: Jun 2007
Location: Bangalore
Posts: 513
Default Re: pointers

^^ i'm not very sure of that !!

btw what kind of programs make use of the near n far ptrs ?? i've never made any use of those stuff


Last edited by red_devil; 11-10-2008 at 09:35 PM. Reason: Automerged Doublepost
red_devil is offline  
Old 17-10-2008, 02:32 PM   #11 (permalink)
Broken In
 
Join Date: Oct 2008
Posts: 133
Default Re: pointers

Quote:
Originally Posted by n6300 View Post
^^ i'm not very sure of that !!

btw what kind of programs make use of the near n far ptrs ?? i've never made any use of those stuff

now a days we dont use these types of pointers much
they were used earlier
if you want to read more about them
http://en.wikipedia.org/wiki/Far_pointer
http://en.wikipedia.org/wiki/C_memory_model
lucifer_is_back is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Indian Rail Online Booking Pointers iMav Tutorials 28 11-05-2009 07:56 PM
Urgent Pointers Reqd: Wanna buy shoes raksrules Chit-Chat 7 06-01-2008 09:51 PM
doesnt any1 knw about "far" pointers in C?? tweety_bird_bunny QnA (read only) 9 12-08-2006 11:07 AM
2d pointers, memset or how to initialise? legolas QnA (read only) 3 06-10-2005 11:36 PM

 
Latest Threads
- by clinton
- by soumya
- by Sujeet
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 11:13 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2