S
subaruwrx88011
Hello,
I am having alot of trouble. I am trying to log some information in
text file form to directory /data/logs.
Here is pseudo code
std::string const M_LOG_PATH = "\\data\\logs\\";
std::string m_log_file_name;
std::string filename = "log.txt"
m_log_file_name = M_LOG_PATH + filename;
std::fstream file;
file.open(m_log_file_name.c_str());
file << "text" << std::endl;
file.close();
So everything works except it puts the file in the executable
directory under the filename \data\logs\log.txt. I want it to put
logs.txt in directory /data/logs.
Can anyone help please???
Thanks
I am having alot of trouble. I am trying to log some information in
text file form to directory /data/logs.
Here is pseudo code
std::string const M_LOG_PATH = "\\data\\logs\\";
std::string m_log_file_name;
std::string filename = "log.txt"
m_log_file_name = M_LOG_PATH + filename;
std::fstream file;
file.open(m_log_file_name.c_str());
file << "text" << std::endl;
file.close();
So everything works except it puts the file in the executable
directory under the filename \data\logs\log.txt. I want it to put
logs.txt in directory /data/logs.
Can anyone help please???
Thanks