View Single Post
Old 03-24-2005, 12:31 AM   #3 (permalink)
JaySun
Registered User
 
Join Date: Mar 2005
Posts: 7
JaySun is on a distinguished road
When I started this program originally (I started all over again in frustration) I had set this up to deal with the array sizes.
Code:
  fname = (char**) calloc (N, sizeof (char*));
  	for (i = 0; i < N; ++i)
		fname[i] = (char*) calloc (50, sizeof (char));
  lname = (char**) calloc (N, sizeof (char*));
  	for (i = 0; i < N; ++i)
		lname[i] = (char*) calloc (50, sizeof (char));
  scores = (float**) calloc (N, sizeof (float*));
  	for (i = 0; i < N; ++i)
		scores[i] = (float*) calloc (4, sizeof (float));
  grades = (char*) calloc (N, sizeof (char));
Does this look correct? Thanks for the help...Hope you enjoyed breakfast.
JaySun is offline   Reply With Quote