Implement a function readEmpFromFile that takes a FlILE * as the only argument and returns a pointer to a struct employee. This function should read the information from the file (reversing what writeEmp ToFile does), create a new employee and fill in the data. If the FILE has no more info (is at end of file), this function should return NULL. This function must also ensure any employee actually created (not the NULL) is added to the array (as is done in createEmployee). Change main to load employees from a file if a command line argument is given to the program (using your readEmpFromFile function you just wrote).
I've been stuck on this for about 3 days now and this is the very last part of my assignment but I don't know how to go about doing it
my friend recommended this site to me 2 days ago and he told me if It is rejected then to just repost it again because it might get to somebody who does know how to solve it so I'm just going to keep going until somebody helps me with this last part
I need help with implementing the changes shown in the image into the code linked at the bottom.
Code must have a function called readEmpFromFile that does what it's supposed to do in the image provided this function is different and should not to be mistaken with the function called readEmployee
Each of these functions does something different than one another
https://onlinegdb.com/jYuB3gpCx
![Implement a function readEmpFromFile that takes a FILE * as the only argument and
returns a pointer to a struct employee. This function should read the information from
the file (reversing what writeEmp ToFile does), create a new employee and fill in the
data. If the FILE has no more info (is at end of file), this function should return NULL.
This function must also ensure any employee actually created (not the NULL) is added
to the array (as is done in createEmployee).
Change main to load employees from a file if a command line argument is given to the
program (using your readEmpFromFile function you just wrote).](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F44bbde83-8f11-44ba-8aaa-e9607f063ad8%2F0b32ced2-4d44-4174-ae1d-ea5affb4bdd8%2Fgyzaaft_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)