Changeset 155a7cf in opengl-game for logger.cpp


Ignore:
Timestamp:
May 10, 2019, 7:42:17 PM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
bae0911
Parents:
e6bc0f4
Message:

Replace printf with cout and cerr in new-game.cpp and logger.cpp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • logger.cpp

    re6bc0f4 r155a7cf  
    44#include <ctime>
    55#include <cstdarg>
     6#include <iostream>
     7
     8using namespace std;
    69
    710bool restart_gl_log() {
    811   FILE* file = fopen(GL_LOG_FILE, "w");
    912   if (!file) {
    10       fprintf(stderr, "ERROR: could not open GL_LOG_FILE log file %s for writing\n", GL_LOG_FILE);
     13      cerr << "ERROR: could not open GL_LOG_FILE log file " << GL_LOG_FILE << " for writing" << endl;
    1114      return false;
    1215   }
     
    2225   FILE* file = fopen(GL_LOG_FILE, "a");
    2326   if (!file) {
    24       fprintf(stderr, "ERROR: could not open GL_LOG_FILE log file %s for appending\n", GL_LOG_FILE);
     27      cerr << "ERROR: could not open GL_LOG_FILE log file " << GL_LOG_FILE << " for appending" << endl;
    2528      return false;
    2629   }
     
    3740   FILE* file = fopen(GL_LOG_FILE, "a");
    3841   if (!file) {
    39       fprintf(stderr, "ERROR: could not open GL_LOG_FILE log file %s for appending\n", GL_LOG_FILE);
     42      cerr << "ERROR: could not open GL_LOG_FILE log file " << GL_LOG_FILE << " for appending" << endl;
    4043      return false;
    4144   }
Note: See TracChangeset for help on using the changeset viewer.