Archived
1
Fork 0

Add file::seek method

This commit is contained in:
Joshua Goins 2022-02-21 12:07:30 -05:00
parent 477ea95905
commit d31715526a

View file

@ -41,6 +41,10 @@ namespace prism {
fread(t, s == 0 ? sizeof(T) : s, 1, handle);
}
void seek(const size_t s) {
fseek(handle, s, SEEK_CUR);
}
/// Reads a string. Assumes the length is an unsigned integer.
void read_string(std::string& str) {
unsigned int length = 0;