Tracey,
Like how Morris showed you above, the name of a file should be a character string array and not a stream like cin, your fin or cout! The fin that you declared in your code above is an input stream object (for reading from a file) equivalent to cin (when you are reading from the keyboad).
You can declare a string representing the name of your file but it will need to be converted to a character string array (old C style) as the constructor/open method for the ifstream and ofstream classes expect a character string array terminated by '\0' character hence you declare it like:
char Filename[20];
Else you could declare it as:
string Filename;
ifstream fin;
ofstream fout;
.
.
.
fin.open(Filename.c_str());
...
Obviously, you need to #include <cstring> for the function c_str().
Hope this explanation will assist you.
Cheers,
Shupi.