Working log for the 2010 FIRST robotics season
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Log.h | |
| #ifndef LOG_H_ | |
| #define LOG_H_ | |
| #include <fstream> | |
| class Log { | |
| public: | |
| ofstream lfr; | |
| Log(char* path); | |
| void addLine(char* line); | |
| void closeLog(); | |
| }; | |
| #endif | |
| // Log.cpp | |
| #include "Log.h" | |
| using namespace std; | |
| Log::Log(char* path) { | |
| lfr.open(path); | |
| } | |
| void Log::addLine(char* line) { | |
| lfr << line << endl; | |
| } | |
| void Log::closeLog() { | |
| lfr.close(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment