>the solution i need to obtain is
>sum = A[j] + B;
What are the types of A, B, and sum? I really don't see what the problem is unless A[j] and B are incompatible for addition, or sum can't hold a value of the result.
the solution couldn't be calculate using pointer like that one i post previously.
solution should be used is
P = R + gm[j]
this is only working with array, not pointer.
Maybe someone else is interested in divining your problem from the babble you've given us, but I'm not. Perhaps when you can mange to describe your problem in a useful way and give us enough informatin to help you, I'll lend my assistence.