The data containing all the measurement is stored in the file. The size of the file, as well as the number of records, is unknown. Particular entries are separated with a semicolon. Write the function, that takes as the argument the name of the file, and reads its contents into the array of loTmeasurement. The function should return the array of loTmeasurement. Dynamic memory allocation is appreciated. The example of the file is (however the file can be a lot longer): loTmeas001;apple;51.234;19.234;34.65;23.54 loTmeas004;pear;51.211;19.413;33.45;22.41 loTmeas003;orange;51.123;19.164;25.76;22.37 loTmeas001;cherry;51.442;19.334;32.57;12.46

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section8.3: Random File Access
Problem 6E
icon
Related questions
Question

In C language

The data containing all the measurement is stored in the file. The
size of the file, as well as the number of records, is unknown.
Particular entries are separated with a semicolon. Write the
function, that takes as the argument the name of the file, and reads
its contents into the array of loTmeasurement. The function should
return the array of loTmeasurement. Dynamic memory allocation is
appreciated.
The example of the file is (however the file can be a lot longer):
loTmeas001;apple;51.234;19.234;34.65;23.54
loTmeas004;pear;51.211;19.413;33.45;22.41
loTmeas003;orange;51.123;19.164;25.76;22.37
loTmeas001;cherry;51.442;19.334;32.57;12.46
Transcribed Image Text:The data containing all the measurement is stored in the file. The size of the file, as well as the number of records, is unknown. Particular entries are separated with a semicolon. Write the function, that takes as the argument the name of the file, and reads its contents into the array of loTmeasurement. The function should return the array of loTmeasurement. Dynamic memory allocation is appreciated. The example of the file is (however the file can be a lot longer): loTmeas001;apple;51.234;19.234;34.65;23.54 loTmeas004;pear;51.211;19.413;33.45;22.41 loTmeas003;orange;51.123;19.164;25.76;22.37 loTmeas001;cherry;51.442;19.334;32.57;12.46
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr