I'm need some help initializing a pointer. Below is a segment of my code that I'm working on. The pointer that I need help with is subjectPtr.
Code:#include <stdio.h> #include <stdlib.h> #include <string.h> struct SUBJECT { int fam; int id; }; typedef struct SUBJECT DATA; DATA *HT; DATA *subject_array; int num_elements = 0; int num_allocated = 0; void readInputFile(FILE *input) { DATA *subjectPtr; void *temp; while(fscanf(input,"%d\t%d", subjectPtr->fam, subjectPtr->id) != EOF) { . . . } } . . .



LinkBack URL
About LinkBacks



