What is the missing line of code in this code to print maximum of two numbers?
#include <bits/stdc++.h>
using namespace std;
int main()
{
list<int> l = {1, 2, 3, 4};
auto it = l.front();
it++;
cout << *(it);
}
Compilation error
Undefined behaviour
2
1
This question is part of this quiz :
C++ Forward List