When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
11 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
You can't std::max the whole vector @noble carbon
So think about using a loop to go over the vector
I guess let's go step by step.
Do you know how to read an integer from a file?
Okay so there are two options at this point, you can either
A) store the ints from a file into a container (like vector) or
B) just loop over the values and keep track of the largest value seen
Which path do you choose to take?
So first things first, can you wrote some code to read all of the numbers and put them into a vector?
You could use std::max_element() though.
This question thread is being automatically closed. If your question is not answered feel free to bump the post or re-ask. Take a look at !howto ask for tips on improving your question.