File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 181181 \frametitlecpp [98]{Pass by value, reference or pointer}
182182 \begin {block }{Different ways to pass arguments to a function}
183183 \begin {itemize }
184- \item by default, arguments are passed by value (= copy) \\
184+ \item By default, arguments are passed by value (= copy) \\
185185 good for small types, e.g.\ numbers
186- \item prefer references for mandatory parameters to avoid copies
187- \item use pointers for optional parameters to allow \mintinline {cpp}{nullptr}
188- \item use \mintinline {cpp}{const} for safety and readability whenever possible
186+ \item Prefer references for mandatory parameters to avoid copies
187+ \item Use pointers for optional parameters to allow \mintinline {cpp}{nullptr}
188+ \item Use \mintinline {cpp}{const} for safety and readability whenever possible
189189 \end {itemize }
190190 \end {block }
191191 \pause
205205 \begin {exercise }{Functions}
206206 Familiarise yourself with pass by value / pass by reference.
207207 \begin {itemize }
208- \item go to \texttt {code/functions }
208+ \item Go to \texttt {code/functions }
209209 \item Look at \texttt {functions.cpp }
210210 \item Compile it (\texttt {make }) and run the program (\texttt {./functions })
211211 \item Work on the tasks that you find in \texttt {functions.cpp }
You can’t perform that action at this time.
0 commit comments