ifstream - read X bytes
How do I read X bytes from an Ifstream, without using getline()... because I want to be able to see the newlines... I think that I could just ifstream:eek() my way through the whole thing, and read bit-by-bit, but this seems somewhat slow...
==================
My (soon-to-be) Cherished Cookie of Appreciation:
-- MattB - for WinSock advice --
ifstream in(filename); //open filein >> noskipws; //don''t skip whitespaceint numread=in.readsome(buffer,X) //read up to X bytes into buffer, not null terminated
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement