Expand|Select|Wrap|Line Numbers
- struct Records
- {
- char * fname;
- char * lname;
- };
- Records** g_Recs; //Array of pointers
- void fakefunc()
- {
- g_Recs = (struct StudentRecords **) malloc (sizeof(struct StudentRecord*));
- g_Recs = (struct Records *) malloc (sizeof(struct StudentRecord));
- g_Recs->fname= (char *) malloc(strlen(buffer));
- }
I'm assuming that I am not mallocing the struct properly and thats is why im getting this erro. If anyone could help me with this, I would greatly appreciate it.