I have a main
function that has a char, I am attempting to pass a pointer to that char
into a function and have it change it from A
to B
but it just doesn't seem to change it. The example shown here is just the current state of the code I have tried many different variations on it thus there may be other mistakes in there from simply clutching at straws.
int main()
{
char result = 'A';
setChar(&result);
printf("%C", result);
}
void setChar(char* charToChange)
{
charToChange = "B";
}