[Solved] error: expected ‘)’ before ‘*’ token


  1. You omitted the typedef that you need to declare your struct alias s.
  2. The struct’s member is b rather than a.
  3. You failed to return anything from your functions. These should be void functions.
  4. You need parens around ss in func1.
  5. The parameterless main in C is int main(void).

 

#include <stdio.h>

typedef struct s_{
        int b;
}s;

void func1(s** ss){
        (*ss)->b = 10;
}

void func(s* t){
        func1(&t);
}

int main(void)
{
        s a;
        func(&a);
        printf("\n a.b : %d \n", a.b);
        return 0;
}

1

solved error: expected ‘)’ before ‘*’ token