Almost right (it is true of more than just COM files), but my half-true statement was merely the result of an attempt to illustrate how the OS handles the command line, while your implication that it has a virtually unlimited length is completely unfounded. See the attached program. The code follows. Included is a batch file with a couple of very long command line arguments. Try running it. If what you're saying is correct, every character in the command line will be printed.Quote:
Originally Posted by Salem
Code:#include <iostream>
using namespace std;
int main(int argc, char **argv) {
cout << "Here are our command line arguments:" << endl;
for (int i = 0; i < argc; ++i)
cout << argv[i] << endl;
cout << endl;
return 0;
}
ByQuote:
Originally Posted by CornedBee
I meant on an x86 Windows machine. Obviously different operating systems don't all manage executables in an equivalent manner.Quote:
Originally Posted by LuckY