int main( int argc, char *argv[])
{
for( count = 0; count < argc; count++ )
{
cout << " argv[" << count << "]" << argv[count] << "\n" << endl;
}
}
Command $ ls -l | ./main.out
The output will show
Command-line arguments :
argv[0] ./main.out
My question is, how do I make my program to read the command before that, ls -l