struct Customers {
char Fname[20];
char Lname[20];
int customerId;
int paperId;
int room;
int age;
float roomPrice;
};
I have this case in my menu:
case 1:{
system("cls");
printf("Give Customer's Last Name: ");
scanf("%s",&c.Fname);
printf("Give Customer's First Name: ");
scanf("%s",&c.Lname);
printf("Give Customer's age: ");
scanf("%d",&c.age);
printf("Give Customer's ID: ");
scanf("%d",&c.customerId);
printf("Give Customer's Card ID: ");
scanf("%d",&c.paperId);
printf("Give Customer's room: ");
scanf("%d",&c.room);
printf("Give Customer's room price: ");
scanf("%f",&c.roomPrice);
system("pause");
break;
}
I'm new at the files world...How can I save the structure to a file? I searched really hard for this,but I found no solutions at all.
Can someone help me?
Any help is highly appreciated!
Thanks in advance!


Sign In
Create Account


Back to top









