c - Warning: passing argument 2 of ‘type_specifier’ from incompatible pointer type -


can please explain these errors? don't have multidimensional array don't understand how i'm getting error.

main.c:291: warning: passing argument 2 of ‘type_specifier’ incompatible pointer type main.c:263: note: expected ‘int *’ argument of type ‘int **’ main.c:291: warning: passing argument 3 of ‘type_specifier’ incompatible pointer type 

here code. call program() main try call declaration_list() program().

void declaration_list(char *strings_line_tokens[], int *big_boy_counter, int *lower_bound_of_big_boy_counter) {     int cmp_str1 = 0;     int cmp_str2 = 0;     int cmp_str3 = 0;     printf("declaration_list().\n");     cmp_str1 = strcmp("int", strings_line_tokens[*lower_bound_of_big_boy_counter]);     cmp_str2 = strcmp("float", strings_line_tokens[*lower_bound_of_big_boy_counter]);     cmp_str3 = strcmp("void", strings_line_tokens[*lower_bound_of_big_boy_counter]);     if(cmp_str1 == 0 || cmp_str2 == 0 || cmp_str3 == 0)     {         declaration(strings_line_tokens, &big_boy_counter, &lower_bound_of_big_boy_counter);     }     //declaration_prime();     //declaration_list(); }  void program(char *strings_line_tokens[], int *big_boy_counter, int *lower_bound_of_big_boy_counter) {     int cmp_str1 = 0;     int cmp_str2 = 0;     int cmp_str3 = 0;     printf("in program().\n");     cmp_str1 = strcmp("int", strings_line_tokens[*lower_bound_of_big_boy_counter]);     cmp_str2 = strcmp("float", strings_line_tokens[*lower_bound_of_big_boy_counter]);     cmp_str3 = strcmp("void", strings_line_tokens[*lower_bound_of_big_boy_counter]);     if(cmp_str1 == 0 || cmp_str2 == 0 || cmp_str3 == 0)     {         declaration_list(strings_line_tokens, &big_boy_counter, &lower_bound_of_big_boy_counter);     } } 

declaration_list(strings_line_tokens, &big_boy_counter, &lower_bound_of_big_boy_counter); 

in big_boy_counter int * , pass it's address . function expects int * .

also 3rd argument need pass int * , lower_bound_of_big_boy_counter int * , pass it's address.

just pass big_boy_counter , lower_bound_of_big_boy_counter in function call's. -

declaration_list(strings_line_tokens, big_boy_counter, lower_bound_of_big_boy_counter); 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -