aboutsummaryrefslogtreecommitdiffstats
path: root/src/OutputFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/OutputFile.cpp')
-rw-r--r--src/OutputFile.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/OutputFile.cpp b/src/OutputFile.cpp
index c411c85..d0d87c8 100644
--- a/src/OutputFile.cpp
+++ b/src/OutputFile.cpp
@@ -22,20 +22,21 @@
#include "OutputFile.h"
#include "PcDebug.h"
+#include <string>
#include <assert.h>
#include <stdexcept>
-OutputFile::OutputFile(const char* filename) :
+OutputFile::OutputFile(std::string filename) :
ModOutput(ModFormat(1), ModFormat(0)),
myFilename(filename)
{
PDEBUG("OutputFile::OutputFile(filename: %s) @ %p\n",
- filename, this);
+ filename.c_str(), this);
- myFile = fopen(filename, "w");
+ myFile = fopen(filename.c_str(), "w");
if (myFile == NULL) {
- perror(filename);
+ perror(filename.c_str());
throw std::runtime_error(
"OutputFile::OutputFile() unable to open file!");
}