2. Define a struct fruitType to store the following data about a fruit Fruit name (string),color (string), Lat (int), su
Posted: Sat May 14, 2022 3:58 pm
2. Define a struct fruitType to store the following data about a fruit Fruit name (string),color (string), Lat (int), sugar (int), and carbohydrate (int) (35pts) a. Write a function definition called getFruitinput that takes an input file stream reference and a fruitType reference as parameters. The function should read values from a file and store data into the variable of fruitType parameter. b. Write a function called printFruitInfo that takes an input file stream reference and a fruitType as parameters. The function should output data stored in the fruitType Parameter.
2. Define a struct fruitType to store the following data about a fruit: Fruit name (string), color (string), fat (int), sugar (int), and carbohydrate (int). (35pts) a. Write a function definition called getFruitInput that takes an input file stream reference and a fruitType reference as parameters. The function should read values from a file and store data into the variable of fruitType parameter. b. Write a function called printFruitInfo that takes an input file stream reference and a fruitType as parameters. The function should output data stored in the fruitType Parameter.
2. Define a struct fruitType to store the following data about a fruit: Fruit name (string), color (string), fat (int), sugar (int), and carbohydrate (int). (35pts) a. Write a function definition called getFruitInput that takes an input file stream reference and a fruitType reference as parameters. The function should read values from a file and store data into the variable of fruitType parameter. b. Write a function called printFruitInfo that takes an input file stream reference and a fruitType as parameters. The function should output data stored in the fruitType Parameter.