Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

lights

macrumors newbie
Original poster
Dec 13, 2011
18
0
Hi,

I am using Xcode 5 and I can't seem to figure out how to display custom expression when I debug a program. What I want to view is a dynamic array. For my class, we are creating a hash table using open addressing so we have to implement it using a dynamic array.

Below is how I allocated the array.
int t_size = 50;
int *var = (int *)malloc(t_size*sizeof(int));

However, when I debug, I only see it as var and the drop down shows it as *var and the value is 0. This makes it hard for me to debug my program since I can't see the values right away.

I looked around online and they said that I can type in something in the expression window like this but I still can't see anything on it:
'*var @ 50'

Any help is appreciated. Thanks.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.