954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

quick question

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

masa
Light Poster
29 posts since Dec 2005
Reputation Points: 10
Solved Threads: 1
 

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.

Ooble
Light Poster
44 posts since Oct 2005
Reputation Points: 12
Solved Threads: 6
 

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

masa
Light Poster
29 posts since Dec 2005
Reputation Points: 10
Solved Threads: 1
 

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.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

can I know how you mark something solve.

masa
Light Poster
29 posts since Dec 2005
Reputation Points: 10
Solved Threads: 1
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You