#include #include #include using namespace std; void createTable() { string tablename = ""; char filename[25]; ofstream fstr; int length; cout << "Please enter the name of the table:" << endl; cin >> tablename; length = tablename.length(); tablename[length+1] = (char)"."; tablename[length+2] = (char)"d"; tablename[length+3] = (char)"a"; tablename[length+4] = (char)"t"; tablename[length+5] = NULL; length = tablename.length(); for(int i = 0; i < length; i++) { filename[i] = tablename[i]; } fstr.open(filename); fstr << "yaz baba yaz."; fstr.close(); } int main () { createTable(); return 0; }