   [ C++] file output error
  I want to implement a class Log for logging.Until now it has 1 function.#ifndef MIN_LOG_H#define MIN_LOG_H#include <fstream>#include <string>namespace Min{class Log{public:Log(const std::string &outputFilename) : out(outputFilename.c_str()) {}// reports an error occured in a functionvoid FunctionError(const std::string &function,const std::string &msg,const std::string &action = "unknown");private:std::ofstream out;};static Log log("Min_Debug.txt");}#endif// code file#include "Min_Debug.h"using namespace Min;using namespace std;void Log::FunctionError(const string &function, const string &msg, const string &action){out << "In function: " << function << endl<< "[" << msg << "]" << endl<< "Action taken: " << action << endl << endl;}int main(){log.FunctionError("main", "errr");}Nothing gets printed. What's wrong?   
  Well, I would guess that the problem lies somewhere in the FunctionError() function. Of course, that's only a guess because you didn't post its definition.   ;  I edited the first post, just scroll down.   ;  It actually printed to a .txt file on my pc. It worked...   ;Quote:Original post by DolfIt actually printed to a .txt file on my pc. It worked...Thanks. I was doing something wrong in another function.   