Assuming you are using Visual Studio, read this elementary article on creating and using DLLs in C++ with Visual Studio, this will be quite enough to start with:
http://msdn.microsoft.com/en-us/library/ms235636%28v=vs.80%29.aspx[
^].
This is 2005, but totally valid for any later version of Visual Studio. If you are not using Visual Studio, it will be helpful anyway. You can find a lot more articles on this elementary topic.
—SA