Can you tell me where is wrong?

I write a cuda code, but there is something wrong: error: expected a member name

typedef struct 

{

	//temp matrix, only read

	float *spec;  // save one particle image

	float *speq;

} cuMem;

cuMem GM;

int main()

{

	cudaMalloc((void **)&GM.spec, sizeof(float)*nsam*nsam); 

	cudaMalloc((void **)&GM.speq, sizeof(float)*nsam*2);

	cudaFree(GM.spec);

	cudaFree(GM.speq);

}

Thank you very much.

What compiler are you using? To my eyes, that looks OK.

I have found the reason.

I defined a macro ahead: define speq SMTH

so, the speq was replaced by SMTH, when it is invoked.

Thank you for your reply.