Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Constant and pointer (http://www.go4expert.com/forums/constant-and-pointer-t23487/)

jaysoft 4Oct2010 13:29

Constant and pointer
 
:cuss:There are cases when you need to define a constpointer to a variable and object; For instance, when taking a function Address, or when you want to protect a pointer from unintended modifications such as assignment of new Address, Pointer arithmetic, etc. In fact, an obj this is a constant pointer . A constant pointer is declared:

xpi0t0s 5Oct2010 11:34

Re: Constant and pointer
 
We all bow to your wondrous knowledge oh great sage. Knowledge that is so great you can leave off the declaration.

(Clue: if you've just learnt something, that's great, but don't start pretending you're now some great genius. Use that knowledge at least 4 hours per day for at least 1 year, THEN you might have something worth posting.)


All times are GMT +5.5. The time now is 21:12.