From 85997776cdc982e5b6f2352977d2eecd88ad19ea Mon Sep 17 00:00:00 2001 From: Disha Jain Date: Wed, 3 Jun 2020 13:09:48 -0400 Subject: [PATCH] Added gif for enhanced visual learning --- slides/01-cpp.html | 4 +++- slides/images/01-cpp/pass_by_ref_value.gif | Bin 0 -> 119091 bytes 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 slides/images/01-cpp/pass_by_ref_value.gif diff --git a/slides/01-cpp.html b/slides/01-cpp.html index f320a8bdc..412cbb562 100644 --- a/slides/01-cpp.html +++ b/slides/01-cpp.html @@ -1423,7 +1423,9 @@

swap()

``` - Use when formal parameter should be *able to change the value* of the actual argument - This is when references are used (and for return values); nobody bothers to declare one inside method - + +Difference between passing by reference vs value +