Community Core Vision 1.4
Cross platform, user friendly computer vision.
C:/CCV/1.4/addons/ofxNCore/example/main.cpp
Go to the documentation of this file.
00001 #include "ofMain.h"
00002 #include "testApp.h"
00003 
00004 #include <stdio.h>
00005 #include <stdlib.h>
00006 
00007 #define LOGIT FALSE
00008 
00009 int main( )
00010 {
00011 
00012     //get rid of the console
00013     #ifdef TARGET_WIN32
00014  //       FreeConsole();
00015     #endif
00016 
00017 #if LOGIT
00018 
00019      /* alright first we need to get time and date so our logs can be ordered*/
00020     char dateStr [9];
00021     char timeStr [9];
00022 
00023     /*time stuff */
00024     time_t rawtime;
00025     struct tm * timeinfo;
00026     char fileName [80];
00027 
00028     time ( &rawtime );
00029     timeinfo = localtime ( &rawtime );
00030 
00031     strftime (fileName,80,"logs/log_%B_%d_%y_%H_%M_%S.txt",timeinfo);
00032 
00033     FILE *stream ;
00034     if((stream = freopen(fileName, "w", stdout)) == NULL)
00035        exit(-1);
00036 
00037         ofSetupOpenGL(900,900, OF_WINDOW);
00038         ofRunApp(new testApp());
00039 
00040     stream = freopen("CON", "w", stdout);
00041 #else
00042         ofSetupOpenGL(900,900, OF_WINDOW);
00043         ofRunApp(new testApp());
00044 #endif
00045 
00046 }
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines