- You omitted the
typedef
that you need to declare your struct aliass
. - The struct’s member is
b
rather thana
. - You failed to return anything from your functions. These should be void functions.
- You need parens around
ss
infunc1
. - The parameterless
main
inC
isint 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