1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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,012
    Likes Received:
    203
    Trophy Points:
    0
    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