ok after completing pset3 I am about to start pset4 im on week 5 of lectures, before going into the pset4 i thought of practice a bit about structures and wrote this code. I idea was to save the entered data in a .txt file so that I can use it later on like we did in pset3 ./generate 1000 > numbers.txt. While trying the same for this code I am not getting the program to run with the following command ./structures > data.txt, but do see a empty .txt file created
include
include
define NUMBER 2
int main (void) { typedef struct { string name; string address; int id; } data;
data students[NUMBER];
for (int i = 0; i < NUMBER; i++)
{
printf("Enter students name:\n ");
students[i].name = GetString();
printf ("Enter the address:\n ");
students[i].address = GetString();
printf("The ID number:\n");
students[i].id = GetInt();
}
}