diff --git a/template/test.cc b/template/test.cc index b720da6..0fad8fb 100644 --- a/template/test.cc +++ b/template/test.cc @@ -1,6 +1,7 @@ #define GL_GLEXT_PROTOTYPES #include +#include #include #include #include @@ -21,6 +22,9 @@ char * loadFile(const char *fname) if (st.st_size <= 0) return NULL; char * buff = new char[st.st_size + 1]; + int fd = open(fname, O_RDONLY); + read(fd, buff, st.st_size); + close(fd); buff[st.st_size] = '\0'; return buff; }