Forum: C Nov 28th, 2008 |
| Replies: 2 Views: 424 Ahh! I see, so you need to allocate space for each structure that the pointer points to.
I ended up using:
students[i] = (struct studentInfo *)malloc(sizeof(struct studentInfo));
... |
Forum: C Nov 28th, 2008 |
| Replies: 2 Views: 424 Hey all, I am a C beginner. My problem with my code is that I get a segfault.
Here's my code
#include <stdio.h>
struct studentInfo {
int totalClasses;
float GPA;
char... |