Proper method of clearing buffer
Hido, ho. Simple question, but one that's been buggin' me. Below is just a snipet and it compiles (though I get a warning about deleting the buffer). So, the question, what's the proper method of clearing the buffer (as it's used several times).
fin.seekg( 0, ios::end ) ;
int size = fin.tellg() ;
fin.seekg( 0, ios::beg ) ;
char tempRead [size + 1];
fin.read( tempRead, size + 1) ;
tempRead[ size + 1 ] = 0 ;
delete tempRead; //warning here...