So far I've been able to answer all all my questions by a dutiful search, but this one has me stumped.
So. I've reduced this code to the minimum necessary to produce the error. Here it is:
#include <studio.h>
struct string {
char *data;
} s;
int main(int argc, char *argv[])
{
printf("Enter a string. ");
scanf("%s\n", &s.data);
printf("%s", s.data);
return 0;
}
I'm using gcc 4.6.3 and compiling with -Wall -g using classic defensive programming tactics.
I posted this from my phone, so there may be typos and autocorrect madness.