Constant and pointer

Discussion in 'C' started by jaysoft, Oct 4, 2010.

  1. jaysoft

    jaysoft New Member

    Joined:
    Oct 4, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    :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:
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    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.)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice