1) The Windows operating system supports the mechanism known as Dynamic Link Libraries which allows a library to be kept separate (in a distinct file) from the main application.
Binding with the functions in the library is done at run-time, the main application being able to scan the DLL file and find the entry points (functions if you like) that it contains.
Binding can even be done in a dynamic way, i.e. by invoking the LoadLibrary system function when you want. The FreeLibrary allows you to later release the DLL.
Using this mechanism, you could very well encapsulate part of your code in a DLL that your main application will load and unload when needed, allowing you to edit the DLL code and rebuild it in the meantime.
To achieve this, you need to fully understand the topics of creating and using DLLs. http://msdn.microsoft.com/en-us/library/ms682589(v=VS.85).aspx
2) Another, much easier solution is offered to you: the Microsoft Visual Studio IDE features an amazing debugging mode known as Edit and Continue: it allows you to modifiy the code while running in a debug session and continue with the modified code compiled on the fly. It is not bulletproof but might be what you are looking for.