Do you have a main program? I create a main program (to test my individual .cpp files), just go to set up a new project. Create a new Win32 console application ("Hello World" works as a good template). From there, you put an include statement in your code like:
#include "c:\dir\dir\...\myfile.cpp"
and when you compile, it will compile the file you included. The included file you are trying to compile should have an include:
#include "c:\.....\myfile.h"
I don't know if that is what your problem is, but that's what I did to solve a problem of compiling and testing my .cpp files.