Ya crea la carpeta de sistema en Linux

This commit is contained in:
2022-11-18 09:48:46 +01:00
parent 896dd9daef
commit 85d6c48f42
5 changed files with 108 additions and 18 deletions

View File

@@ -135,6 +135,15 @@ void Stats::saveToFile()
// Crea y abre el fichero de texto
std::ofstream file(filePath);
if (file.good())
{
std::cout << filePath << " open for writing" << std::endl;
}
else
{
std::cout << filePath << " can't be opened" << std::endl;
}
// Escribe en el fichero
file << "# NOMBRE DE LA HABITACION;VISITAS;MUERTES" << std::endl;
for (auto item : list)