Click here to Skip to main content
Click here to Skip to main content
Alternative Tip/Trick

Tagged as

Looking at pointer declarations

, 15 Jan 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
It is very simple :laugh: and fun ..just divide the line before and after * , likeconst int * pconst int (before *) represent [constant integer]and *p represent a pointer add both u get a pointer pointing to a constant integer , it means u can't change value but pointer can...
It is very simple Laugh | :laugh: and fun ..
 
just divide the line before and after * , like
 
const int * p
 
const int (before *) represent [constant integer]
and *p represent a pointer
 
add both u get a pointer pointing to a constant integer , it means u can't change value but pointer can point to different address .
 
simiarly

int * const p

same way ...
 
go to here for best explanation understand pointer

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

avinash064

United States United States
No Biography provided

Comments and Discussions

 
GeneralReason for my vote of 5 nice PinmemberHeaven202020-Jun-11 5:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141216.1 | Last Updated 16 Jan 2010
Article Copyright 2010 by avinash064
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid