compile message : what does it mean?

I am getting the compile time error message

“expression must contain pointer-to-object type”

and can find nothing wrong.

The statement the message refers to is

float h,dwdx, rho_j,myp,myrho;

__device__ float p[NTOTAL];

int j;

h = -dwdx*(myp/(myrho*myrho) + p[j]/(rho_j*rho_j));

Problem solved!

How did you manage to solve the problem? I’m having a similar problem myself. Any details or links to information would be greatly appreciated.