LSINPUTLISTING LIGNES EXCLUSE
\lstinputlisting[linerange={1-4,7-9}]{file.cc}
The Code Doctor
\lstinputlisting[linerange={1-4,7-9}]{file.cc}