Join Peggy Fisher for an in-depth discussion in this video Call by value vs. call by reference, part of Up and Running with C++.
…There are two types of parameters that can be used in functions.…One is considered a call by reference and the other is a call by value.…The biggest difference is that the call by…reference allows the function and the main program…or the calling program to point to the…same address that contains the value of the variable.…So if the function changes the contents of a variable passed by reference.…The new value is now available to the main program.…
Another way to think about the call back value is that…a copy of the argument's value is passed to the function.…Changes to this value on the function do not affect the original value.…Let's take a look at two examples.…Let's start with call by value.…In this callbyvalue.cpp program we have our function defined above the main.…The comment says, this function adds five to a…and b temporarily since they are call by value arguments.…
The function header, or the function signature, has a…return type of void, it does not return anything.…The name of the function, addfive, and the two values,…
- Downloading and exploring the C++ IDE
- Working with loops
- Using predefined functions
- Creating custom functions
- Creating and instantiating classes
- Working with external files
Skill Level Beginner
Q: How do I upgrade the C++ compiler on Mac OS X and Linux?
A: Refer to C/C++ Essential Training for a detailed look at installing or upgrading the C++ compiler on various platforms.
Q: The link to download the Eclipse IDE in the "Download a C++ IDE" movie doesn't work. Where can I find the IDE?
A: Short URLs are case sensitive and need to be typed in exactly as they appear. Type in or simply click http://goo.gl/CzckWp to visit the Eclipse IDE for C/C++ Developers page.
1. Getting Started
2. C++ Basics
3. Flow of Control
4. Classes and Objects
5. Data Structures
6. File Manipulation
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.