I remember from INT322 that you could access an element of the array by passing in a -1 for the last element. For example we have the array
int x[5] = {1,2,3,4,5}
if in perl we did x[-1] it would return 5. Using fardad's IntArr class as a base coming up with a solution to this should not be difficult. I will update this when i get the solution. I hope
int x[5] = {1,2,3,4,5}
if in perl we did x[-1] it would return 5. Using fardad's IntArr class as a base coming up with a solution to this should not be difficult. I will update this when i get the solution. I hope
No comments:
Post a Comment