Hey,
I am trying to create log files in a different directory than where my
executable is at. I am pretty stumped. This is what I have in psuedo
code.
std::string const M_LOG_PATH = "\\data\\logs\\";
std::string m_log_filename_with_path;
std::string filename = "log.txt";
m_log_filename_with_path = M_LOG_PATH + filename;
std::fstream file;
file.open(m_log_filename_with_path.c_str());
file << "text" << std::endl;
file.close();
So....everything works but it creates the files in the same directory
as the executable and the whole file name ends up being "//data//logs//
log.txt" instead of log.txt in the //data/logs directory.
Can anyone help???