meaning of this

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yousuf
    New Member
    • Jan 2008
    • 4

    meaning of this

    (int *)(p) // where p is an char pointer //
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    Originally posted by yousuf
    (int *)(p) // where p is an char pointer //

    This is on the left or right side of the expression?
    If it is on right side then the pointer p is being type-casted

    Raghuram

    Comment

    • tburger
      New Member
      • Jul 2007
      • 58

      #3
      Type casting refers to the dynamic process in which one data type is converted into another at the programmer's discretion. In this case, you are "forcing" p to become an integer pointer. This is usually applied when you want to use the data for a particular operation that requires a different data type...

      Until again,

      Tom

      Comment

      Working...