Created
November 29, 2016 12:13
-
-
Save russeree/8b647ad6accd1b0a0df8b1e4cb89d865 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
//Pass F by a reference and incrament it | |
int ref_pass(int& x){ | |
x++; | |
return x; | |
} | |
int main() | |
{ | |
int x = 0; | |
ref_pass(x); | |
std::cout << x; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment