Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Argument passing by using reference and value
//clang 3.8.0 #include <iostream> using namespace std; void dup(int& a,int& b,int& c){ a+=2; b+=2; c+=2; } int main() { int d=5,e=6,f=7; dup(d,e,f); cout << "a="<<d<<"\n""b="<<e<<"\n"<<"c="<<f; return 0; }
run
|
edit
|
history
|
help
0
Linker error while taking the address of a constexpr variable
Magic, why 1 2?
Pure virtual function called!
Reference example
marquee text in C++
Thread-safe Interval Average Calculator
Recursive Call Example Sum
BucketSort
void pointer
Division by zero exception example