Arrays with functions.

I'm attempting to put an array of chars into a function with a default value with this:

char * Name[] = "Millennium Munch"

as one of the arguments; I'm getting an error that says:

Error:default argument of type "const char *" is incompatible with parameter of type "char**"


Could anyone help me?

Thanks, Ben.
'Name' is an array of pointers to chars but you are trying to fill with chars. It needs to be an array of chars
char Name[] = "Millenium Munch";
Last edited on
O.K, thanks!
Topic archived. No new replies allowed.