codice:
#include <limits>
//...
for(int i=0;i<=numerorighedaignorare;i++)
    in.ignore(numeric_limits<streamsize>::max(),'\n' );