passing character to a function
What I basically have is:
Code:
int main()
{
char * myText;
myText = "blah";
function(myText);
return 0;
}
function(char * text)
{
//do stuff
}
what I want to be able to do is pass a single character to my function, however when do this:
Code:
function(myText[1]);
It doesn't work and I get compiler errors.
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 :)