Oculus | Online | Read Buffers
Anonymous User
883
class Read4k {
	protected :
		int read4k(char * buf ) ;
};

class IO : Read4k {
	public :
		int read ( int requestedBytes, char * buf );
};

Implement IO::read by only calling read4k where read4k reads 4 kilobytes at a time and returns the number of bytes read and fills the buf buffer. read4k has an internal stream and stream pointer. IO::read takes in the number of bytes you desire and fills buf, and returns the number of bytes read.

Comments (1)