My professor cited this example in class. Its basically a version of the Unix more command, and I’m unsure about a couple things in it
int main( int ac , char *av[] )
{
FILE *fp;
if ( ac == 1 )
do_more( stdin );
else
while ( --ac )
if ( (fp = fopen( *++av , "r" )) != NULL )
{
do_more( fp ) ;
fclose( fp );
}
else
exit(1);
return 0;
}
I understand that *fp defines a file pointer, and that *av[] is the array of command line arguments. But what does *++av mean in terms of operation?
read *++av like this:
in this example, it will open every files passed on the command line.
also: