SaraB 7 years ago
parent
commit
fd8210f387
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      README-en.md

+ 2
- 1
README-en.md View File

@@ -264,13 +264,14 @@ In the introduction to the topic of functions you saw that in mathematics and in
264 264
     ---
265 265
 
266 266
 3. Open the file `main.cpp` (in Sources). Study the `illustration` function and how to call it from the `main` function. Note that the variables `argValue` and `argRef`are initialized to 0 and that the function call for `illustration` makes a pass by value of `argValue` and a pass by reference of `argRef`. Also note that the corresponding parameters in `illustration` are assigned a value of 1.
267
-
267
+'''
268 268
       void illustration(int paramValue, int &paramRef) {
269 269
         paramValue = 1;
270 270
         paramRef = 1;
271 271
         cout << endl << "The content of paramValue is: " << paramValue << endl
272 272
              << "The content of paramRef is: " << paramRef << endl;
273 273
       }
274
+'''
274 275
 
275 276
 4. Execute the program and observe what is displayed in the window `Application Output`. Notice the difference between the content of the variables `argValue` and `argRef` despite the fact that both had the same initial value, and that `paramValue` and `paramRef` were assigned the same value. Explain why the content of `argValor` does not change, while the content of `argRef` changes from 0 to 1.
276 277