We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
We don't want to use raw pointers in C++. We almost never use them, exept for interfacing with a C-written library. In this exercise, we should use references instead. But here's the solution:
Pointer
You are viewing a single comment's thread. Return to all comments →
We don't want to use raw pointers in C++. We almost never use them, exept for interfacing with a C-written library. In this exercise, we should use references instead. But here's the solution:
And in real C++: