I got a problem with my code, I basically want to write files to a path but it doesn't seems to work. Here's the code:
void WriteOnFile(const char *path)
{
ofstream filetolog;
filetolog.open(path);
if (filetolog)
filetolog<< "--[[ Test ]]\n";
}
and then I call WriteOnFile like that:
WriteOnFile("C:/Logs/lua/testing/filename.lua");
but it doesn't work. I also tried without if (filetolog)
but it's the same.
Could anyone help me please?