I am passing a struct info a function, and in that function I am using scanf() to assign input values to the inner variables of the struct. The inner variable is an unsigned int.
When I use:
scanf("%u",s->member) or scanf("%u",(*s).member) I get a warning:
windows.c:62:36: warning: format specifies type 'unsigned int *' but the argument has type 'unsigned int' [-Wformat]
And a seg fault when I run.
If I use s.member or (&s).member I get a compiler error.
Is there something I need to be doing different because I am trying to access a struct inner variable?
I know there are apparently issues with scanf() so some people say to use fgets(), is this an issue of scanf()?