Here is what I have:
} else if ( argc > 1 ){
for ( int arg = 1; arg < argc; ++arg ){
infile.open( argv[arg] );
if ( infile ){
list = read_file( &infile, &lines );
}
}
}
argv[1] = text.txt gets opened, but argv[2] = text2.txt does not. Why would this be?
command line: sortIt text.txt text2.txt
if I do sortIt text2.txt text.txt then text2.txt opens and text.txt does not.
Any help would be appreciated. Thanks.