why can't c++ ifstreams review devices?


i knew i should never have started controlling c++ io, whole "type safety" justification red herring (does anyone really it's many dire problems?). anyhow, i did, detected uncanny inadequacy between ifstreams file*s plain aged record descriptors: ifstreams can't review device. anyone cruise reason why?



const char* route = "/dev/disk3";
char b;

// works
file* f= fopen(path, "rb");
int i = fread(&b, 1, 1, f); // advantage 1, success!

// does work
ifstream cf(path, ios::binary);
cf.read(&b, 1);
bool good = cf.good(); // advantage false, failure.


Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?