Hi
when I was looking on some thread, a question :?: comes to my mind, when you have a file like the one Log.csv from Aldin post, do you need to put it in a dynamic array to get the max and the min and the date..etc.
or you can only open the file and built some function to get the max the min ..etc.

thank you

Recommended Answers

All 4 Replies

If I understand that thread correctly (I'm not sure I do, but I'll do my best), what you want to find is the maximum and minimum values for each row in the "table". What I would personally do would be to read in the file a line at a time, and store the first value as both the maximum and the minimum. You'd then loop through and compare the current value to the recognised maximum and minimum values, and make changes as necessary until you have the results you want. You'd then store the info in a std::vector of structures or something.

Sorry for not making my self clear enough, if you see the following thread
http://www.daniweb.com/techtalkforums/thread36795-1.html
so if you check this thread you will find that they put the log.csv file in a dynamic array, before finding the min and the max ( is this necesary :?: ) or they can only open the Log.csv file and then make some function to find the min and the max.

thanks in advance

It is not necessary to actually store the data in a vector or some other array. Just keep track of the min and max values as the data is read from the file.

can I know how you mark something solve.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.