Char array help

I am modifying a function that scrolls text on an LED Matrix. Originally it set the text to scroll inside the function, like so

void AlphabetSoup()
{
  char msg[] = "THE OBLIGATORY ARDUINO LED MATRIX PROJECT  ";
(code that scrolls msg)
}

I want to be able to call it like this

AlphabetSoup('text to display');

So how do you pass in an array of chars with no predefined number of chars in the array?

Any help is appreciated
ematson5897

Well, for a start you surround it with "" not '' :wink:

And the parameter format is "char *"

void AlphabetSoup(char *msg)
{
(code that scrolls msg)
}

AlphabetSoup("THE OBLIGATORY ARDUINO LED MATRIX PROJECT  ");

Ok, I changed that and now this line in the scrolling code gives me an error

    int alphabetIndex = msg[charIndex] - '@';

Error:

sketch_jun13a.cpp: In function 'void AlphabetSoup(char)':
sketch_jun13a:167: error: invalid types 'char[int]' for array subscript

sketch_jun13a.cpp: In function 'void AlphabetSoup(char)':

You missed the * didn't you?

void AlphabetSoup(char __*__msg)

Wow I could swear i put that there. Well it should work now. My dad does some programming in C and he told me the same thing except he also told me to define it globally too. So that didn't work