what is wrong with this?
my app crash when i try to run it..?Code:#include <iostream> #include <fstream> using namespace std; ifstream fin; ofstream fout; int main() { char* tname = 0; cout << "Enter the name of the file to change :" << endl; cin >> tname; fout.open(tname); if (! fout.is_open()) { cout << "Error opening file"; return 1; } fout << "yo bob!"; fout.close(); return 0; }