Compiling matrix multiplication example

I’m new to Cuda and to C++. I have been successful with several small/easy cuda programs, but have had difficulty compiling programs that involve more than one file. Can someone please direct me as to how to compile the matrix multiplication example from the programming guide and sdk?

Thanks