pointer of array of class

Home Forums C Programming pointer of array of class

This topic contains 1 reply, has 2 voices, and was last updated by  Humayan 9 years, 8 months ago.

  • Author
    Posts
  • #2089

    harleen
    Member

    hello!
    i have problem with program i made:
    the program should define a pointer to pointer which points to dynamic array of Grade (class i made).
    i increase the size of the array in function. so i made a new pointer to pointer which point to array of Grade (the class i made). i transferred the old array to new one, and finaly, before i going out of the function, i shoud transfer it’s address to the first pointer i made:

    how can i transfer the address of “gradeTemp” to “numGrades”?
    thank you,
    Moshiko

  • #3375

    Humayan
    Member

    You want to return the newly copied array from the function “AddGrade” ?  If so change your parameters to :
     

You must be logged in to reply to this topic.

0 Shares
Share
+1
Tweet
Share
Stumble