I would like to load the contents of a text file into a vector (or into any char input iterator, if that is possible). Currently my code looks like
vector
use an iterator:
#include istream_iterator data( file ); istream_iterator end; vec.insert( std::back_inserter(vec), data, end );