string datname = "test.txt"; ofstream output(datname.c_str()); output << "irgendwas";