I
Ian Malone
Sorry if this is a FAQ, but I had a quick look through the
FAQ Lite and couldn't see it. Googling gives inconsistent
answers.
I'm coming from a C background. In C if I want to use
command line arguments my understanding is I must #include
<stdlib.h>.
Do I need to do a similar thing with C++? I.e., what do
I need to do if I want "int main (int argc, char **argv)"?
I've seen sites which include iostream, but that seems to
be so they can use "cout <<". I've seen sites including
stdlib.h; deprecated at best, misguided at worst. So what
should I do? is there a header file I need to use?
FAQ Lite and couldn't see it. Googling gives inconsistent
answers.
I'm coming from a C background. In C if I want to use
command line arguments my understanding is I must #include
<stdlib.h>.
Do I need to do a similar thing with C++? I.e., what do
I need to do if I want "int main (int argc, char **argv)"?
I've seen sites which include iostream, but that seems to
be so they can use "cout <<". I've seen sites including
stdlib.h; deprecated at best, misguided at worst. So what
should I do? is there a header file I need to use?