Skip to content

Instantly share code, notes, and snippets.

@LucianoPAlmeida
Created February 5, 2023 13:59
Show Gist options
  • Save LucianoPAlmeida/08c6a0966883066cb3ed1ae1468b4153 to your computer and use it in GitHub Desktop.
Save LucianoPAlmeida/08c6a0966883066cb3ed1ae1468b4153 to your computer and use it in GitHub Desktop.
void sumBy(int *p, const int value) {
for(int i = 0; i < 10; ++i) {
p[i] += value;
}
}
void sumByRef(int *p, const int &value) {
for(int i = 0; i < 10; ++i) {
p[i] += value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment