Subject: c++ compiler command line argument passing
To: None <>
From: Joseph Sarkes <joe@js1.jsnet>
List: tech-toolchain
Date: 08/07/2000 21:58:51
I am trying to compile the following simple c++ program

#include <iostream> 
int main (int argc, char* argv[])
int i;
cout << "hello world\n";
cout << argc << "\n";
for(i = 0, i < argc, i++) cout << argv[i];

When I try to compile the above program, I get:

c++ -O2   -o t In function `int main(int, char **)': syntax error before `)'
*** Error code 1


What is wrong with the argument list accessing method I am using?
It is the same as I am familiar with in C and also what the 
Stroustrop C++ book spells out.  Is this MY error, or the C++ 
compiler toolchain?

Joseph Sarkes