diff --git a/chapter03.tex b/chapter03.tex index a154367..5516efe 100644 --- a/chapter03.tex +++ b/chapter03.tex @@ -702,12 +702,14 @@ $(1,2)$, $(1,5)$ and $(2,3)$. In a similar way, tuples (\texttt{tuple}) are sorted primarily by the first element, -secondarily by the second element, etc.: +secondarily by the second element, etc.\footnote{Note that in some older compilers, +the function \texttt{make\_tuple} has to be used to create a tuple instead of +braces (for example, \texttt{make\_tuple(2,1,4)} instead of \texttt{\{2,1,4\}}).}: \begin{lstlisting} vector> v; -v.push_back(make_tuple(2,1,4)); -v.push_back(make_tuple(1,5,3)); -v.push_back(make_tuple(2,1,3)); +v.push_back({2,1,4}); +v.push_back({1,5,3}); +v.push_back({2,1,3}); sort(v.begin(), v.end()); \end{lstlisting} After this, the order of the tuples is