#include <bits/stdc++.h> using namespace std; int main() { int b; vector<int>={32,3,4,34,32,5465,6543} b=d[*max_element(d.begin(),d.end())]; cout << b; }
why won't this code print the max element of the vector d.
Aucun commentaire:
Enregistrer un commentaire