 
            
            
            
            
                21 Nov
                
                    2019
                
            
            
                21 Nov
                
                '19
                
            
            
            
        
    
                10:36 a.m.
            
        Frederick Gotham wrote:
- - - - THE IDEA I CAME UP WITH:
Open the file using "ifstream", and then use a special iterator that will stop reading from the file after 32 bytes, with syntax like this:
ifstream logfile("log.txt");
hex( istream_iterator_limited<char>(logfile,32), istream_iterator_limited<char>(), g_some_global_container.begin() );
No takers on this? For the time being I have it in my own personal Boost stash and I use it from time to time when inputting from a file directly into a function like "hex".