*a++
doesn’t increment the value pointed to by `a`, it increments `a` itself. The value remains intact. int increment(a)
{
return a+1;
}
void somefunc()
{
int b = 5;
b = increment(b);
printf("b now %d\n", b);
} T get_t(int how, char **error);
int get_val(T *v);
One could rewrite these as struct get_t_res {T; char *};
struct get_t_res get_t(int);
struct get_val_res {int; T};
struct get_val_res get_val();
But what do you think of it?Noob mistake