Good evening, I’m projecting a c language program, the objective of my program is to creat a self-service resteraunt, in particular I have a text external file. With my IDE I have to import the text file with the variable fopen, then I have to do some questions at user that use the final program, for example: “Do you follow a vegetarian diet?; or “are you intolerant to dairy products?”.
In the text file I have a list with a different types of food, and every type of food has his characteristics, among which the answer of the question that the user did. My problem is to create a connection between the program and the questions, with text external file, because the next point that I will create is to create an automated personal menù for different people needs.
Today I have tried to resolve my problem with different types of functions, but I could not.
First I have tried with IF variable but it wasn’t good, then i found in a c language book a new type of variable: fscanf e fgets, but also this variables wasn’t ok. So i ask you if you know a different way to resolve my problem. Thank you
Matteo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.