I have the following struct deceleration and I would like to decrement eq->pt_tree[c][r], the row portion of pt_tree[c][r] using pointer subscript. How can I do this?

struct eq_values{
   int * pt_tree[2];
}; 
eq->pt_tree[i] = (int *) malloc(12 * sizeof (int));

I think it will look like the following, but this is not it

*(eq->pt_tree[c])--;

Try --(*eq->pt_tree[c]); .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.