I want to write in a file that has the name of the curent date and time.
Code:
std::string date ()
{
char date [10];
char time[10];
std::ostringstream os;
_strdate(date);
_strtime(time);
os << date << " " << time << ".txt";
return os.str();
}
const std::string PATH = "e:\\" + date();
std::ofstream out(PATH.c_str(), std::ios::out);
Am i doing something wrong with the PATH? because it doesnt create any file.