I wrote a class and I want to give it to someone to use, but I dont want them to have access to the source code. My class is split into 2 files a .h and a .cpp how can I block them from seeing the cpp file only the .h i am using vs2008

put it in a library or dll and distribute the .h file with the lib or dll.

ok how do I go about doing this. I am fairly new to programing. is there a command to do this??

To have your code in e.g. a static library, create a new win32 static library solution. Add your files to the solution and compile. Now you have a .lib that you can ship along with your header file(s) for others to use. See Visual Studio's help on how to take the .dll approach.