Copy x characters from a file to a c++ string?

I want to copy 15 characters at a time from a file into a c++ string until the eof is reached (if the last read is less than 15 then I want those too). None of the methods in ifstream looked appropriate ( I don't want any delimiter).

What's the best way of doing this?

Thanks!
You can use fread to read exactly 15 bytes. http://www.cplusplus.com/reference/clibrary/cstdio/fread/
Topic archived. No new replies allowed.