/************************************ * file enc : utf8 * author : wuyanyi09@gmail.com ************************************/ #include "io_functs.h" namespace CPPCOMMON { string loadFile2Str(const char * const filepath) { ifstream in(filepath); istreambuf_iterator beg(in), end; string str(beg, end); in.close(); return str; } } #ifdef TEST_IO_FUNCTS #include using namespace CPPCOMMON; using namespace std; int main() { char filename[] = "1/2/3"; cout<