Why and how can I fix this code that segfault?
#include <stdio.h>
#include <stdlib.h>
struct blah{
char *answer;
char *data;
};
struct haha{
long value;
struct blah dog;
};
struct haha *ga;
int
main(void)
{
     /* it sigfaults at this line */
     ga->dog.answer = "a string!";
printf("%s", ga->dog.answer);
return (0);
}




_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

Reply via email to