can anyone tell me what is wrong with the above code? When I try to compile it my compiler(I tried MSVC++ 6.0, Borland c+ 5.02, MinW, and Cygwin) always complaines about ofstream fin(playername + ".txt"); is this not the correct way to do this?Code:#include <iostream> #include <fstream> #include <string> using namespace std; void main() { string playername; cout << "What is the players name"; cin >> playername; ofstream fin(playername + ".txt"); fin << "Hello World"; }