how would i name the file with a random name?
i get these errors when i try and compile
Code:10 C:\Documents and Settings\wmorrish\Desktop\New Folder\main.cpp invalid conversion from `int' to `const char*' 10 C:\Documents and Settings\wmorrish\Desktop\New Folder\main.cpp initializing argument 1 of `std::basic_ofstream<_CharT, #include <fstream> #include <iostream> #include <ctime> #include <cstdio> using namespace std; int main() { srand((unsigned)time(0)); int name = rand()%3; ofstream new_file(name, ios::app); new_file << "leval 1" <<endl; }



LinkBack URL
About LinkBacks


