Skip to content

Commit 8826384

Browse files
committed
Update lecture 20
1 parent 8d2a752 commit 8826384

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lecture20.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ \section{Pointer}
178178
\begin{frame}[fragile]{Pointer arithmetic}
179179

180180
\begin{lstlisting}
181-
int* array = new[3];
181+
int* array = new int[3];
182182
*array = 1;
183183
*(array + 1) = 2;
184-
*(array + 1) = 3;
184+
*(array + 2) = 3;
185185

186186
// Accessing the first element
187187
int first = *array;

0 commit comments

Comments
 (0)