C++ Crash Course: Solution to Exercise 3-4.


My solution to Exercise 3-4 from Part 1, Chapter 3 of C++ Crash Course.

This one was fairly straightforward, but it illustrates a very important thing on line 13. When you assign new_value to the reference original_ref, it assigns the value to the int that original_ref is pointing to. The result is that new_value and original both have the same value, 200.

Github:

Youtube:

Popular posts from this blog

C programming and relevancy

C++ Crash Course: Solutions to Exercises in Part 1, Chapter 1.