ok, i got an object, call him bob. im looking for the fastest way to populate a stl container like vector or map of bobs from a file. i was told a while ago i could use the copy function to directly load the entire file into the vector, however im unclear of how to do this, or the rules governing the copy. is this the fastest way? is it faster than looping reading each one individually? copy(ifstream.begin(),ifstream.end(),vec_bob.begin ()); <-would something like that be what im looking for? Thanks for the help.



LinkBack URL
About LinkBacks


