There is a portability problem with using seekg/tellg on files open in text mode: this does not necessarily return the same number as the number of characters you would read from the file. Use binary mode if you want to deal with file sizes.
it's more idiomatic to let the string grow as needed, since disk I/O is usually slower than log(size) memory allocations.