In code like int main(int argc, char **argv)
, I'M trying to understand command line arguments a little better. And what would be the difference between char ** argv
& char * arg[]
? Thanks.
lewashby
56
Junior Poster
Recommended Answers
Jump to PostThere is no difference, functionality-wise between
char** argv
andchar* argv[]
. It's all a matter of preference.
Jump to PostIn C and C++ type char is different from type std::string or a C style string.
In this case the asterix indicates a pointer to type char. The whole business of chars, strings, pointers, etc, can be quite difficult to keep track of. In fact, I won't guarantee the interpretations …
All 5 Replies
Tumlee
42
Junior Poster in Training
Lerner
582
Nearly a Posting Maven
vmanes
1,165
Posting Virtuoso
lewashby
56
Junior Poster
Lerner
582
Nearly a Posting Maven
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.