Skip to content

Instantly share code, notes, and snippets.

@cderwin
Last active June 25, 2017 20:06
Show Gist options
  • Save cderwin/76356303ee8df303cac44495a55089c9 to your computer and use it in GitHub Desktop.
Save cderwin/76356303ee8df303cac44495a55089c9 to your computer and use it in GitHub Desktop.
c++ references
#include <iostream>
int main() {
int a = 0;
int b = 7;
int& aRef = a;
int& bRef = b;
aRef = bRef;
std::cout << a << " " << b << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment