[C++] code 중간에 txt파일로 로그 남기기


[C++] code 중간에 txt파일로 로그 남기기

코드 중간에 하이잭해서 txt파일로 로그파일을 만들고 싶을 때 유용한 방법이다. #include <iostream> #include <cstdio> int main(int argc, char* argv[]) { using namespace std; freopen( "output.txt", "w", stdout ); freopen( "error.txt", "w", stderr ); cout << "Output message" << endl; cerr << "Error message" << endl; } 출처 : https://stackoverflow.com/questions/7400418/writing-a-log-file-in-c-c Writing a Log file in C/C++ I want to write a log file in C++. I am processing certain things and thus I need to maintain a log of the propert...



원문링크 : [C++] code 중간에 txt파일로 로그 남기기