How to run a CUDA program in Visual studio 2010


I have followed every step given in the following link to run a cuda program in Visual Studio 2010 but still I find that the Builder is unable to recognize the global qualifier. Please help me to fix the problem.

The error which I get is something like : this declaration has no storage class or type specifier

Could you please copy a sample code here?