Alex Rivera | Logout

Should I use char** argv or char* argv[]?

Asked 2009-04-23T01:02:56.267
137

I'm just learning C and was wondering which one of these I should use in my main method. Is there any difference? Which one is more common?

Edit
Report

1 Answer

-2

If you'll need a varying or dynamic number of strings, char** might be easier to work with. If you're number of string is fixed though, char* var[] would be preferred.

answered 2009-04-23T01:21:38.123

Your Answer