Hello everyone,
I'm having an issue using strcpy() and having one of the values being an array of structs. Here's the important parts:
I have all of my variables declared properly, so there's no need to worry about that. This version compiles fine, but I get a segmentation fault every time I get to this part of the program. Essentially, my question is if I'm using the strcpy() function correctly for my situation. If you need the rest of the code for troubleshooting, let me know. I didn't put all of it in because it's lengthy and messy.Code:#include <string.h> . . . struct identifiers { char * category; char * name; char * itype; char * scope; char * lifetime; }symbols[60]; . . . strcpy((&symbols[i])->name, yytext);
Thanks ahead of time.
vital101