Number5
Visualisierung 2 Project - Florian Schober (0828151, f.schober@live.com), Andreas Walch (0926780, walch.andreas89@gmail.com)
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
Util.cpp
Go to the documentation of this file.
1
#include "
Util.hpp
"
2
3
string
Util::read_file_to_string
(
string
const
& filename)
4
{
5
ifstream shaderFile(filename);
6
7
if
(shaderFile.good())
8
{
9
string
result = string(istreambuf_iterator<char>(shaderFile),
10
istreambuf_iterator<char>());
11
shaderFile.close();
12
13
return
result;
14
}
15
else
16
{
17
cerr <<
"ERROR: Could not load file '"
<< filename <<
"'"
<< endl;
18
exit(EXIT_FAILURE);
19
}
20
}
Util::read_file_to_string
string read_file_to_string(string const &filename)
Definition:
Util.cpp:3
Util.hpp
Generated on Fri Jun 6 2014 13:57:29 for Number5 by
1.8.7