C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

POINTERS

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
akhilesh natani
Guest





PostPosted: Sat Sep 23, 2006 9:10 am    Post subject: POINTERS Reply with quote



hi sir,
sir i want to know a simple pointer concept.
Q) ..... when all of thw address are integer then why we uses the
pointer of type char,float etc.
Back to top
Bill
Guest





PostPosted: Sat Sep 23, 2006 9:10 am    Post subject: Re: POINTERS Reply with quote



"akhilesh natani" <akhileshnatani (AT) gmail (DOT) com> wrote in message
news:1158995065.279907.283880 (AT) m73g2000cwd (DOT) googlegroups.com...
Quote:
hi sir,
sir i want to know a simple pointer concept.
Q) ..... when all of thw address are integer then why we uses the
pointer of type char,float etc.


A pointer is an internal address. As such, pointers are more like bit
strings than integers. For instance, on a 64 bit machine, a pointer is going
to occupy 64 bits, even if an int only occupies 32. No matter how you
regard pointers, the data type of "a pointer to an int" is some variation of
int*--not the same data type as int.

-Bill
Back to top
Licheng Fang
Guest





PostPosted: Sat Sep 23, 2006 9:10 am    Post subject: Re: POINTERS Reply with quote



akhilesh natani wrote:
Quote:
hi sir,
sir i want to know a simple pointer concept.
Q) ..... when all of thw address are integer then why we uses the
pointer of type char,float etc.

as far as I know, pointers need to know not only what the address is,
but also what the address is pointing to. only in this way can the
operators ++ and --, etc work properly when applied to a pointer.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.