mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-25 03:53:18 +03:00
fixed compile error and added header for runtime_error
This commit is contained in:
parent
9621cba99e
commit
2797e9a719
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <stdexcept>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -123,10 +124,10 @@ CDragInformation::stringToNum(CString& str)
|
|||||||
CString
|
CString
|
||||||
CDragInformation::getFileSize(CString& filename)
|
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()) {
|
if (!file.is_open()) {
|
||||||
throw runtime_error("failed to get file size");
|
throw std::runtime_error("failed to get file size");
|
||||||
}
|
}
|
||||||
|
|
||||||
// check file size
|
// check file size
|
||||||
|
Loading…
Reference in New Issue
Block a user