seminar05
This commit is contained in:
parent
1d5f2cac48
commit
c01f40aca3
7 changed files with 108 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ using std::string, std::pair, std::cout, std::endl, std::vector;
|
|||
|
||||
template <typename T>
|
||||
T maximum(const vector<T>& v) {
|
||||
T max;
|
||||
T max{};
|
||||
for(int i = 0, size = v.size(); i < size; ++i) {
|
||||
if (v[i] > max)
|
||||
max = v[i];
|
||||
|
|
|
|||
Reference in a new issue