What I basically have is:
what I want to be able to do is pass a single character to my function, however when do this:Code:int main() { char * myText; myText = "blah"; function(myText); return 0; } function(char * text) { //do stuff }
It doesn't work and I get compiler errors.Code:function(myText[1]);
What I want is the way to pass a single character to this function? Note that I still want to be able to pass whole arrays to this function.
Any help would be appreciated