Create a gist now

Instantly share code, notes, and snippets.

Working log for the 2010 FIRST robotics season
// 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