#ifdef _DEBUG
#include <string>
#include <fstream>
#define DEBUGTOFILE(file,string) \
{ \
std::ofstream debugfile; \
debugfile.open(file, std::fstream::out | std::fstream::app); \
debugfile << std::to_string(GetCurrentProcessId()) << " " << std::to_string(GetCurrentThreadId()) << " "; \
debugfile << string << " - "; \
debugfile << __FILE__ << "(" << __LINE__ << "): " << __FUNCSIG__ << std::endl; \
debugfile.close(); \
}
#else
#define DEBUGTOFILE(file,string)
#endif // _DEBUG
Previous:
How would a time machine influence computability
Next:
Error: unable to find numeric literal operator