cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Question about int main()
Question about int main()
Apr 18, 2013 at 10:26pm UTC
closed account (
D3pGNwbp
)
Hi.
What does 'int argc, char *argv[]' inside of 'int main()' do?
And is it needed?
Thanks,
Phillip
Last edited on
Apr 18, 2013 at 10:27pm UTC
Apr 18, 2013 at 10:40pm UTC
vlad from moscow
(6539)
They are used if you or other program that calls your program want to pass command line parameters to your program. If you run your program without passing any command line parameters then you can define the function simply as
int main()
{
...
}
Apr 18, 2013 at 10:58pm UTC
closed account (
D3pGNwbp
)
Thanks
Topic archived. No new replies allowed.