0

I have a problem with one thing, it works to compare a character in another function if I send it like '(' instead of an array character. Not the clearest description but look at the example code and you might understand.

char arr[5];
arr[0] = ")";

void func(){
  to_another_func("(");      
  to_another_func(&arr[0]);      
 }

void to_another_func(char*a) {
if(strcmp(a, "(") == 0)
printf("a is (");
}

According to me that's the same, if not, how can I make it the same?

Adam Röhr
  • 21
  • 3

0 Answers0