3 arguments to main???

I stumbled across this ( http://www.bogotobogo.com/cplusplus/cplusplus_keywords.php ) article which refers to there being 3 arguments to main like so:
1
2
3
4
5
int main(int argc, char* argv[], char* options[])
{
    /*code goes here*/
    return 0;
}


Was it just a typo in the article, or can there actually be 3 arguments to main?
Last edited on
All implementations must allow
int main()
and int main(int argc, char *argv[])
but can also allow other definitions of main(). The only requirement is that main() returns an int.

In Unix systems, it's common to have the one you mention. The 3rd argument contains the environment variables: a series of strings of the form variable=value
Last edited on
Thank you so much. Your answer makes perfect sense. Thank you for explaining it so well.
Topic archived. No new replies allowed.