-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
References #13
Comments
Reference Operator '&'& :
double square (double &x) { return x *= x; }
int bar (void) {
double foo = 10.0;
square (foo);
cout << foo; // prints 100.0
}
void printDouble(const double& rd)
{ cout << rd; } // no need to test rd; it must refer to a double
void printDouble(const double *pd)
{ if (pd) cout << *pd ; } // check for null pointer |
Argument Passing Modes
Selecting correct mode for arguments
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: