Ok, get this,My cousin and I spent from 8:00 PM last night to 6:00 AM this morning! This sucks. WE cant get crap to wrok. I looked at your guys suggestions and could only do so much. Heres my program below so hopefully you guys can critique it and help me out. Its really appreciated.
Code:
/* C program by C.Redfield for CS1410
* show an example of using structures
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct family {
char name [50]; /* person's name */
char street [50]; /* street address */
char csz [50]; /* city, state, zip */
char relation [50]; /* relation to you */
char birthday [50]; /* mm-dd-yy */
char age [50]; /*person's age */
};
struct family PEOPLE[5];
struct family *field;
void main (void)
{
char linein[50];
FILE *in, *out;
in = fopen ("a:\\family.in", "r");
/* out = fopen ("a:\\family.out", "w"); */
while ( !feof(in) )
{
fgets(linein, 50, in);
printf("the line: %s", linein);
}
/* fgets(buffer, sizeof(buffer), in); */
/* sscanf(buffer, "%s %s %s %s %s %s"), *member->name, *member->street, *member->csz, *member->relation, *member->birthday, *member->age);*/
/* printf("%s\tRelation: %s\n%s\tBirthday: %s\n%s\tAge: %s\n\n",
*member->name, *member->street, *member->csz, *member->relation, *member->birthday, *member->age); */
fclose(in);
fclose(out);
}