Pointers and arrays in c++object orientated programming

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sechaba
    New Member
    • Mar 2010
    • 1

    #1

    Pointers and arrays in c++object orientated programming

    What is the relationship between pointers and arrays;how are this two ultimately related and used together?

    thanks a lot
  • Dheeraj Joshi
    Recognized Expert Top Contributor
    • Jul 2009
    • 1129

    #2
    Array is similar to pointer.

    you define array as
    Code:
    int a[20];
    now
    Code:
    *a
    points to a[0];

    incrementing a by size of integer(since a is of type integer) you can traverse all the elements of an array.

    Go through this link

    Comment

    Working...