From 2797e9a71959520900869c602e350195fbdcf942 Mon Sep 17 00:00:00 2001 From: jerry Date: Tue, 6 May 2014 19:23:40 +0000 Subject: [PATCH] fixed compile error and added header for runtime_error --- src/lib/synergy/DragInformation.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/synergy/DragInformation.cpp b/src/lib/synergy/DragInformation.cpp index ba83b06d..882f0dd8 100644 --- a/src/lib/synergy/DragInformation.cpp +++ b/src/lib/synergy/DragInformation.cpp @@ -20,6 +20,7 @@ #include #include +#include using namespace std; @@ -123,10 +124,10 @@ CDragInformation::stringToNum(CString& str) CString CDragInformation::getFileSize(CString& filename) { - std::fstream file(filename, ios::in|ios::binary); + std::fstream file(filename.c_str(), ios::in|ios::binary); if (!file.is_open()) { - throw runtime_error("failed to get file size"); + throw std::runtime_error("failed to get file size"); } // check file size