Yes, they are called header files. I believe there is a tutorial on this site about that. Then after you have made your header file you include it into your main file like this:
Code:
#include "MyHeader.h"