This code worked perfectly at school in the lab but when I copied it to notepad and sent it to myself via email and pasted the code into Dec-C++...
Separate names with a comma.