Wait, do you want to password protect your code? Or implement a password into your program?
If its to password protect your code, try compressing the files into a password protected zip file.
However if your question is to implement passwords in your program than its all unto you. Make sure your knowledge of Strings and C-Strings is high, and you know enough about encryption.